Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reusing Ruby code across several Rails applications

I have developed a simple library in Ruby and need to use this in several Rails applications (some of which are not built yet). What is the best way to easily add this Ruby library to several Rails applications as and when required? Our team is running Ubuntu and our repository is Mercurial.

Should I use a...

  1. Rails plugin? This would be my first choice but it appears not to support Mercurial??
  2. Ruby Gem?
  3. Custom Rake script?
  4. Other options??

Any pointers would be much appreciated!

like image 738
Darren Jensen Avatar asked Jul 13 '26 15:07

Darren Jensen


1 Answers

Ruby already has an established mechanism for code sharing i.e. RubyGems. Jeweler makes Gem creation easy. I'd recommend that you check it out.

like image 144
John Topley Avatar answered Jul 16 '26 07:07

John Topley