Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to distribute a Ruby application with the required gems

I've developed a Ruby application (a small game), and I would like to 'distribute' it to other people.

However, I am not sure what to do about the required gems. If I just send my application to someone who have ruby installed, but not the required gems, I assume it will blow up. Can I package the gems locally? If so, would it conflict if the other person has a different version of the gem?

So, what is the smart/proper/good way of doing this?

like image 269
phss Avatar asked Sep 17 '09 22:09

phss


2 Answers

The best way would probably be to just package your game as a gem as well, that way rubygems will take care of installing the dependencies. Here's the documentation explaining how to create your own gems.

like image 194
sepp2k Avatar answered Oct 04 '22 05:10

sepp2k


If you'd rather not package your game as a gem, you could investigate the Bundler, which will be integrated into Rails 3.

like image 36
Greg Campbell Avatar answered Oct 04 '22 04:10

Greg Campbell