rubyscript2exe error message

G

Gavin Chen

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.
 
L

Luis Lavena

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?

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,
 
G

Gavin Chen

Luis Lavena wrote in post #1000218:
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.
 
G

Gavin Chen

Gavin Chen wrote in post #1000408:
Luis Lavena wrote in post #1000218:


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.
 
L

Luis Lavena

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.
 
W

Will Parsons

Gavin said:
Luis Lavena wrote in post #1000218:

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

Luis Lavena

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
 
G

Gavin Chen

Gavin Chen 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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,968
Messages
2,570,150
Members
46,697
Latest member
AugustNabo

Latest Threads

Top