From: Devin Christensen Date: 2013-06-19T07:55:33+09:00 Subject: Re: Creating ruby script exe --bcaec520f75504013704df75899b Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Looks like there's an example in the docs: You can detect whether OCRA is currently building your script by looking for the =91Ocra=92 constant. If it is defined, OCRA is currenly building th= e executable from your script. For example, you can use this to avoid opening a GUI window when compiling executables: app =3D MyApp.new if not defined?(Ocra) app.main_loop end On Tue, Jun 18, 2013 at 5:27 AM, Rochit Sen wrote: > Hi All, > > I have been using the gem 'ocra' to create .exe files for my ruby > scripts. I run the following command: > > ocra --console foo.rb > > This creates the .exe but also runs the script once to create the .exe. > I am facing an issue where i have a script which uses 'file-tail' to > tail a log file. In this case when i run the above 'ocra' command, it > does not create the .exe as the script runs and starts to watch the log > file as it would normally do and hence ocra .exe creation does not > complete. > > Any thoughts how to avoid the above? > Thanks > > -- > Posted via http://www.ruby-forum.com/. > > --bcaec520f75504013704df75899b Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: quoted-printable
Looks like there's an example in the docs:

You can detect whether OCRA is currently building your script = by looking for the =91Ocra=92 constant. If it is defined, OCRA is currenly = building the executable from your script. For example, you can use this to = avoid opening a GUI window when compiling executables:

=A0 =A0app =3D MyApp.new
=A0 =A0if not = defined?(Ocra)
=A0 =A0 =A0app.main_loop
=A0 =A0end


On Tue= , Jun 18, 2013 at 5:27 AM, Rochit Sen <lists@ruby-forum.com> wrote:
Hi All,

I have been using the gem 'ocra' to create .exe files for my ruby scripts. I run the following command:

ocra --console foo.rb

This creates the .exe but also runs the script once to create the .exe.
I am facing an issue where i have a script which uses 'file-tail' t= o
tail a log file. In this case when i run the above 'ocra' command, = it
does not create the .exe as the script runs and starts to watch the log
file as it would normally do and hence ocra .exe creation does not
complete.

Any thoughts how to avoid the above?
Thanks

--
Posted via http://= www.ruby-forum.com/.


--bcaec520f75504013704df75899b--