Forum: JRuby Sharing gems with different JRuby versions?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Miika Leppänen (Guest)
on 2009-06-04 09:48
(Received via mailing list)
Hello

What is a good/recommended way of sharing gems between different JRuby
versions in OS X/Linux? I'd like to have setup where I can easily
switch between versions, because there are new releases so often and
it would help to test for compatibility issues.


- Miika

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
Matt Fletcher (Guest)
on 2009-06-04 16:22
(Received via mailing list)
I think the best way to do this is to freeze your gems to your project.
Err the Blog has a good writeup about this technique:
http://errtheblog.com/posts/50-vendor-everything

He discusses freezing gems in the context of a Rails application, but
his
technique is easy to adapt to any project structure.

There are other benefits of freezing gems to your project (as Err the
Blog
discusses), but I think this will solve your immediate problem.
Damian S. (Guest)
on 2009-06-04 17:36
(Received via mailing list)
On 4 Jun 2009, at 06:47, Miika Leppänen wrote:

> Hello
>
> What is a good/recommended way of sharing gems between different
> JRuby versions in OS X/Linux? I'd like to have setup where I can
> easily switch between versions, because there are new releases so
> often and it would help to test for compatibility issues.

Neither good, nor recommended, but try adding the directories to
GEM_PATH, e.g.:

export GEM_PATH=/path/to/jruby1.2/lib/ruby/gems/1.8:/path/to/jruby1.3/
lib/ruby/gems/1.8

Use 'gem environment' to check that worked.

Damian
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
Miika Leppänen (Guest)
on 2009-06-04 18:19
(Received via mailing list)
On 4.6.2009, at 16.11, Damian S. wrote:

> Neither good, nor recommended, but try adding the directories to
> GEM_PATH, e.g.:
>
> export GEM_PATH=/path/to/jruby1.2/lib/ruby/gems/1.8:/path/to/
> jruby1.3/lib/ruby/gems/1.8
>
> Use 'gem environment' to check that worked.
>
> Damian

Ok, thanks, this will help.

- Miika
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
Joseph A. (Guest)
on 2009-06-04 21:12
(Received via mailing list)
You could just get JRuby right from github and then build it yourself.
That
way you can either stay current with trunk, or just switch your working
copy
to the release that you want.  Then your gems can always just stay in
the
same location.

Joe
This topic is locked and can not be replied to.