Making executable file from Ruby program
I wrote a program in Ruby but I want to make an开发者_Python百科 executable file from my program in order to run it in any computers( that they don't have ruby).How can I make executable file? thanks
You could use RubyScript2Exe
http://www.erikveen.dds.nl/rubyscript2exe/
.. it collects all necessary files to run your application on an other machine: the Ruby application, the Ruby interpreter and the Ruby runtime library (stripped down for your application)
You should look at this list of options given your needs:
http://ruby-toolbox.com/categories/packaging_to_executables.html
They all have their strengths and drawbacks. NOTE: I have not used any of them.
Take a look on my rb2exe. It supports Rails and Gemfile.
gem install rb2exe
echo "puts 'Hello world'" > test.rb
rb2exe test.rb
./test
You can also check my detailed step-by-step how to, here: http://www.learnwithdaniel.com/2016/08/ruby-to-portable-exe-app/
精彩评论