[Ironruby-core] One gem to rule them all?

Ivan Porto Carrero ivan at flanders.co.nz
Tue Jan 5 18:51:40 EST 2010

you can share gems by setting a location in .gemrc
But there be dragons. because gem install will only generate the proper
executable links for the version that is installing the gem.

if you don't want to download the gems all the time then you can just reuse
the .gem file from

Assuming you have ruby installed in /usr


if you share a location you can use gem pristine gem_name to (re)install the
gem in the other ruby version.

for libraries that don't have any executables or native extensions that
should work just fine. the core of the gems functionality is to add the
paths /usr/lib/ruby/gems/1.9.1/gems/*/lib to the load path.

The install process also copies the files from the gem/bin folder to
/usr/lib/ruby/gems/1.9.1/bin and then to /usr/bin

If you use homebrew then this stuff is hidden a little bit deeper because
homebrew symlinks the lib,bin,var,.. folers from within a Cellar repository.

So in short you should be able to do so but sometimes it might require a
little bit of work to make it dance.

Met vriendelijke groeten - Best regards - Salutations
Ivan Porto Carrero
Blog: http://flanders.co.nz
Google Wave: portocarrero.ivan at googlewave.com
Twitter: http://twitter.com/casualjim
Author of IronRuby in Action (http://manning.com/carrero)

On Wed, Jan 6, 2010 at 12:38 AM, Ben Hall <ben2004uk at googlemail.com> wrote:

> Hi guys,
> On my MacBook I'm noticing I'm having to install a gem three times
> (MRI, IronRuby, JRuby) - which is getting really annoying :)
> Am I doing something wrong??? Is there a way around this??
> Thanks
> Ben
> _______________________________________________
> Ironruby-core mailing list
> Ironruby-core at rubyforge.org
> http://rubyforge.org/mailman/listinfo/ironruby-core
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20100106/75d457bd/attachment.html>

More information about the Ironruby-core mailing list