Rubyscript2exe error message

First I used “gem install reubyscript2exe” to install

When I use “rubyscript2exe file.rb” it will show below error message

C:/Ruby187/lib/ruby/gems/1.8/rubyscript2exe-0.5.3/bin/rubyscript2exe:5:in
‘replace’:can’t modify frozen string (TypeError)

from
C:/Ruby187/lib/ruby/gems/1.8/gems/rubyscript2exe-0.5.3/bin/rubyscript2exe:5

from C:/Ruby187/bin/rubyscript2exe:19:in ‘load’
from C:/Ruby187/bin/rubyscript2exe:19

And I used reubyscript2exe on Hello.rb(just print “hello”)

it also show the same error message as above.

How do I fix the error message?

Thanks.

On May 22, 10:31am, Gavin C. [email protected] wrote:

from C:/Ruby187/bin/rubyscript2exe:19:in ‘load’
from C:/Ruby187/bin/rubyscript2exe:19

And I used reubyscript2exe on Hello.rb(just print “hello”)

it also show the same error message as above.

How do I fix the error message?

I personally don’t have a solution for rubyscript2exe gem, specially
since hasn’t been an update to it since 2007.

You might have better results using Ocra:

http://ocra.rubyforge.org/

Which supports latest version of Ruby (1.9.x) and works perfectly with
latest version of RubyGems.

HTH,

On Sun, 22 May 2011 23:31:44 +0900
Gavin C. [email protected] wrote:

First I used “gem install reubyscript2exe” to install

Don’t use it. It won’t work with any recent version of Ruby.

Luis L. wrote in post #1000218:

On May 22, 10:31am, Gavin C. [email protected] wrote:

from C:/Ruby187/bin/rubyscript2exe:19:in ‘load’
from C:/Ruby187/bin/rubyscript2exe:19

And I used reubyscript2exe on Hello.rb(just print “hello”)

it also show the same error message as above.

How do I fix the error message?

I personally don’t have a solution for rubyscript2exe gem, specially
since hasn’t been an update to it since 2007.

You might have better results using Ocra:

http://ocra.rubyforge.org/

Which supports latest version of Ruby (1.9.x) and works perfectly with
latest version of RubyGems.

HTH,

I used ocra and can succeed convert script to exe file.
It is very easy to use.

Thanks.

Gavin C. wrote in post #1000408:

Luis L. wrote in post #1000218:

On May 22, 10:31am, Gavin C. [email protected] wrote:

from C:/Ruby187/bin/rubyscript2exe:19:in ‘load’
from C:/Ruby187/bin/rubyscript2exe:19

And I used reubyscript2exe on Hello.rb(just print “hello”)

it also show the same error message as above.

How do I fix the error message?

I personally don’t have a solution for rubyscript2exe gem, specially
since hasn’t been an update to it since 2007.

You might have better results using Ocra:

http://ocra.rubyforge.org/

Which supports latest version of Ruby (1.9.x) and works perfectly with
latest version of RubyGems.

HTH,

I click the exe file directly why does it just only show a few seconds
and disappear very quickly.

Does it just only can use by windows command-line? Or I should add some
condition on the script?

Thanks.

On May 23, 12:33pm, Gavin C. [email protected] wrote:

I click the exe file directly why does it just only show a few seconds
and disappear very quickly.

That is because is a console application. Console application that
terminate immediately cause that flick when open.

Does it just only can use by windows command-line? Or I should add some
condition on the script?

If you created a command line application, then I would suggest you
open a command prompt before calling your program.

If you actually created a GUI based application, then I suggest you
read Ocra documentation about usage of GUI mode so there is no console
displayed when you double click the application.

Gavin C. wrote:

I personally don’t have a solution for rubyscript2exe gem, specially
since hasn’t been an update to it since 2007.

You might have better results using Ocra:

http://ocra.rubyforge.org/

Which supports latest version of Ruby (1.9.x) and works perfectly with
latest version of RubyGems.

Does ocra work with prawn now? Last I knew, it didn’t, which made it
useless
for my work. (I went back to rubyscript2exe.)

On May 23, 7:23pm, Will P. [email protected] wrote:

Does ocra work with prawn now? Last I knew, it didn’t, which made it useless
for my work. (I went back to rubyscript2exe.)

Ocra will only bundle in the executable files that were #require or
#load on them.

If your files for prawn are using #read or similar, you will require
to indicate that additional files need to be added.

I believe this is covered in the documentation:

http://ocra.rubyforge.org/

And if not, then Ocra Issue tracker is your friend:

https://github.com/larsch/ocra/issues

Which, btw, this might be related to your case:

https://github.com/larsch/ocra/issues/24

spiralofhope wrote in post #1000301:

On Sun, 22 May 2011 23:31:44 +0900
Gavin C. [email protected] wrote:

First I used “gem install reubyscript2exe” to install

Don’t use it. It won’t work with any recent version of Ruby.

Thanks.

Gavin C. wrote in post #1000209:

First I used “gem install reubyscript2exe” to install

When I use “rubyscript2exe file.rb” it will show below error message

C:/Ruby187/lib/ruby/gems/1.8/rubyscript2exe-0.5.3/bin/rubyscript2exe:5:in
‘replace’:can’t modify frozen string (TypeError)

from
C:/Ruby187/lib/ruby/gems/1.8/gems/rubyscript2exe-0.5.3/bin/rubyscript2exe:5

from C:/Ruby187/bin/rubyscript2exe:19:in ‘load’
from C:/Ruby187/bin/rubyscript2exe:19

And I used reubyscript2exe on Hello.rb(just print “hello”)

it also show the same error message as above.

How do I fix the error message?

Thanks.

The script not only use on windows but also want to use on Linux.

How to create the binary file(such as exe file on win) on linux.

Source code don’t show to others.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs