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.
cc_c
May 22, 2011, 5:36pm
2
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,
cc_c
May 23, 2011, 3:23am
3
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.
cc_c
May 23, 2011, 6:15pm
4
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.
cc_c
May 23, 2011, 6:33pm
5
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.
cc_c
May 23, 2011, 7:07pm
6
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.
cc_c
May 24, 2011, 1:25am
7
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.)
cc_c
May 24, 2011, 2:36am
8
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:
Which, btw, this might be related to your case:
opened 01:01AM - 20 Apr 11 UTC
closed 08:36AM - 19 Jun 11 UTC
Env: Window XP SP3, ruby 1.9.2 installed using rubyinstaller
Package a script… which required the 'rake' gem. Ocra ran fine with no error message. When I tried to invoke the executable I received the following message:
C:/DOCUME~1/Owner/LOCALS~1/Temp/ocr28.tmp/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36: in 'require' no such file to load --- prawn (LoadError) .
from C:/DOCUME~/owner/LOCALS~//Temp/ocr28.tmp/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `'require'
rom C:/DOCUME~/owner/LOCALS~//Temp/ocr28.tmp/src/df_dda.rb:22:in`<main>'
Examination of ocra's output reveals that only the following lines contained "prawn"
a lib/ruby/gems/1.9.1/specifications/prawn-0.11.1.gemspec --- appears twice
m lib/ruby/gems/1.9.1/prawn-0.11.1/
a lib/ruby/gems/1.9.1/prawn-0.11.1/COPYING
a lib/ruby/gems/1.9.1/prawn-0.11.1/HACKING
a lib/ruby/gems/1.9.1/prawn-0.11.1/LICENSE
a lib/ruby/gems/1.9.1/prawn-0.11.1/README
no listing of rb files for the prawn gem.
Use the following program which replicates the problem.
require 'prawn'
puts "Hello world"
the specifications list pdf_reader-0.9.1.gemspec, Ascii85-1.0.0.gemspec, and ttfunk-1.0.1.gemspec as prawn dependencies.
Only pdf_reader rb files are listed in ocra's output.
Assistance in solving this problem is appreciated.
Thank you
Bernard Kenik
cc_c
May 23, 2011, 6:25pm
9
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.
cc_c
May 24, 2011, 5:44pm
10
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.