Anyone knows which tools can be used to make independent exe - file from ruby - script? I tried both exerb and rubyscript2exe. But they are obsolete and don't work properly(
exerb can't properly make exe from script file which uses "require net/http" :-( rubyscipt2exe does nothing, just nothing :-(
I also wanted to generate .exe file from my ruby script several months ago, and exerb and rubyscript2exe didn't work for me, either. Finally, I decided to use ocra, and I hope my solution can help you.
gem install ocra
ocra your_ruby_script.rb
if you are lucky enough, ocra should generate your_ruby_script.exe after step2. However, I was not lucky, and I faced the following error messages when the first time I used ocra:
Invalid gemspec in [c:/Ruby187/lib/ruby/gems/1.8/specifications/ocra-1.3.0.gemspec]: invalid date format in specification: "2011-06-19 00:00:00.000000000Z "
Invalid gemspec in [c:/Ruby187/lib/ruby/gems/1.8/specifications/win32-autogui-0.5.0.gemspec]: invalid date format in specification: "2011-08-17 00:00:00.000000000Z" 1.8.8
Don't be disappointed. Just edit these files
c:/Ruby187/lib/ruby/gems/1.8/specifications/ocra-1.3.0.gemspec
c:/Ruby187/lib/ruby/gems/1.8/specifications/win32-autogui-0.5.0.gemspec
change
"2011-06-19 00:00:00.000000000Z " into "2011-06-19"
"2011-08-17 00:00:00.000000000Z" into "2011-08-17"
redo step 2 after editing these files, and everything should be great now.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With