UPDATE!
Cowlibob did a fix, find it at : http://github.com/cowlibob/rubyscript2exe
Untested!
From ‘The Higgs bozo’ on the ruby newsgroup. Apply change to both rubyscript2exe and tar2rubyscript. As far as I know that makes it work with newer versions of Ruby but I didn’t get to play with it yet.
— rubyscript2exe.rb.orig 2009-04-03 10:28:41.140806000 -0400
+++ rubyscript2exe.rb 2009-04-03 10:29:40.108423800 -0400
@@ -618,7 +618,7 @@
newlocation do
if __FILE__ == $0
- $0.replace(File.expand_path(“./init.rb”))
+ $0 = File.expand_path(“./init.rb”)
TAR2RUBYSCRIPT = true unless defined?(TAR2RUBYSCRIPT)
I’ve had mixed results with this. It seems that $0.size is important; if the new value is a longer string, it will be truncated.
This would explain the posters on ruby-talk who saw no output after applying the ‘Higgs Bozo’ fix.
I’ve yet to find a _proper_ fix, but modifying the temp path name earlier in the code has helped in my instance.
The temp path name – where is that in the code?
I’ve since found a better fix, to alias $0 to another global string, which is then assigned File.expand_path(“./init.rb”).
See http://gtihub.com/cowlibob/rubyscript2exe for the explanation and fixed script.
Hope that’s of help.
Sorry, typo: that should be http://github.com/cowlibob/rubyscript2exe