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

/usr/lib/ruby/gems/1.9.1/cache

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.

http://blogs.sun.com/mandy/entry/rubygems_etc_gemrc
---
Met vriendelijke groeten - Best regards - Salutations
Ivan Porto Carrero
Blog: http://flanders.co.nz
Google Wave: portocarrero.i...@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 <ben200...@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@rubyforge.org
> http://rubyforge.org/mailman/listinfo/ironruby-core
>
_______________________________________________
Ironruby-core mailing list
Ironruby-core@rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core

Reply via email to