Itay Maman
Itay Maman

Reputation: 30723

Self contained ruby "binary"?

[Ruby Noob]

I have a small (command line) utility written in Ruby, which requires a few gems. Is there a way to create a self contained bundle of my program such that I can run it on another machine that has Ruby installed (but not necessarily the gems)?

FWIW, the target machine runs Linux/Ubuntu.

Upvotes: 1

Views: 568

Answers (2)

Yonatan Maman
Yonatan Maman

Reputation: 2498

You can use the gem bundle http://gembundler.com/ With bundle you create a Gemfile in your project root - a text that contains all your dependencies, very similar to Maven concept

In order to fetch all your dependencies simply tun

bundle install 

The only issue is that you need to have the bundle gem itself installed, so you are back with the chicken-or-Egg problem :-)

Upvotes: 1

GroovyCakes
GroovyCakes

Reputation: 361

I've used:

http://www.erikveen.dds.nl/rubyscript2exe/

before, but it was a while ago. Seemed to work okay for simple programs.

You can download it here:

http://rubyforge.org/projects/rubyscript2exe/

Upvotes: 0

Related Questions