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.
04abd207430e1cf62ebed77ae6b6707c?d=identicon&s=25 Miika Leppänen (Guest)
on 2009-06-04 07: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
7a911e6eb94f7be3e6bd4623145df192?d=identicon&s=25 Matt Fletcher (Guest)
on 2009-06-04 14: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.
879729f95e12e753e282966d982cc8b6?d=identicon&s=25 Damian Steer (Guest)
on 2009-06-04 15: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
04abd207430e1cf62ebed77ae6b6707c?d=identicon&s=25 Miika Leppänen (Guest)
on 2009-06-04 16:19
(Received via mailing list)
On 4.6.2009, at 16.11, Damian Steer 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
22785d4dbf585723bf60458ece0170e1?d=identicon&s=25 Joseph Athman (Guest)
on 2009-06-04 19: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.