And here are some usage examples:

Install:

gem install rb2exe


Example I - Simple script:
echo "puts 'Hello world'" > test.rb

rb2exe test.rb
./test
# Hello world

Example II - Multi source project:
mkdir test
cd test
echo "STR = 'Hello world'" > a.rb
echo "load 'a.rb'" > main.rb
echo "puts STR" >> main.rb

rb2exe main.rb --add=.
./main
# Hello world

Example III - Gemfile support:
mkdir test
cd test
echo "source 'https://rubygems.org'" > Gemfile
echo "gem 'faker'" >> Gemfile
echo "require 'faker'" > a.rb
echo 'puts "Hello #{Faker::Name.name}"' >> a.rb

rb2exe a.rb --add=.
./a
# Hello Abbigail Okuneva

Example IV - Rails support:
rails new myproject
cd myproject

rb2exe --rails
./output
# => Booting Puma
# => Rails 5.0.0.1 application starting in production on http://0.0.0.0:3000
# => Run `rails server -h` for more startup options
# Puma starting in single mode...
# * Version 3.6.0 (ruby 2.2.2-p95), codename: Sleepy Sunday Serenity
# * Min threads: 5, max threads: 5
# * Environment: production
# * Listening on tcp://0.0.0.0:3000
# Use Ctrl-C to stop

Example V - OSX binary:
rb2exe test.rb --target=osx

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/de61ee57-1eac-42ff-9d58-39eb680bb914%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to