how to handle two different gem version using RVM

20 views
Skip to first unread message

honey ruby

unread,
Sep 2, 2013, 10:34:03 AM9/2/13
to rubyonra...@googlegroups.com
Hi Everyone,


I have two projects one projects need gem version of 1.3.7 and another one 1.4.2 using RVM can we have two different gem versions.




Thanks in advance

Carlos Mathiasen

unread,
Sep 2, 2013, 10:36:01 AM9/2/13
to rubyonra...@googlegroups.com
You can use gemset for that[0]


Matt's


--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/3f6ecb20-05a6-4024-8791-f9cffac54255%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Colin Law

unread,
Sep 2, 2013, 10:40:13 AM9/2/13
to rubyonra...@googlegroups.com
On 2 September 2013 15:36, Carlos Mathiasen <gunma...@gmail.com> wrote:
> You can use gemset for that[0]
>
> [0] https://rvm.io/gemsets

Alternatively if you specify the version you want in Gemfile and then
run bundle install it will use that version for that application.
Repeat for the other application.

Colin
> https://groups.google.com/d/msgid/rubyonrails-talk/CALX-aHoOzrNe4xG6h3%3D20EDaCPcrTrQ%3DWjzCHdhTA%2B%3D_5_QcUw%40mail.gmail.com.

Dave Aronson

unread,
Sep 2, 2013, 11:23:27 AM9/2/13
to rubyonrails-talk
On Mon, Sep 2, 2013 at 10:34 AM, honey ruby <emailtoh...@gmail.com> wrote:

> I have two projects one projects need gem version of 1.3.7 and another one
> 1.4.2 using RVM can we have two different gem versions.

Also consider vendoring your gems. I'm not sure how to migrate an
extant project to use this technique, but when you *create* a project,
do "rails new project_name --skip-bundle", cd into the project, and do
"bundle install --path vendor --binstubs". Then all the gems will be
down under the vendor dir. This will keep your projects well
separated for minimal interference, and make it much easier for you to
navigate to the source of a given gem if you ever need to see it. You
can do this with or without rvm, or any other Ruby-version manager.

-Dave

--
Dave Aronson, the T. Rex of Codosaurus LLC,
secret-cleared freelance software developer
taking contracts in or near NoVa or remote.
See information at http://www.Codosaur.us/.

Jordon Bedwell

unread,
Sep 2, 2013, 11:28:39 AM9/2/13
to rubyonra...@googlegroups.com
On Mon, Sep 2, 2013 at 10:23 AM, Dave Aronson
<googlegr...@davearonson.com> wrote:
> On Mon, Sep 2, 2013 at 10:34 AM, honey ruby <emailtoh...@gmail.com> wrote:
>
>> I have two projects one projects need gem version of 1.3.7 and another one
>> 1.4.2 using RVM can we have two different gem versions.
>
> Also consider vendoring your gems. I'm not sure how to migrate an
> extant project to use this technique, but when you *create* a project,
> do "rails new project_name --skip-bundle", cd into the project, and do
> "bundle install --path vendor --binstubs". Then all the gems will be
> down under the vendor dir. This will keep your projects well
> separated for minimal interference, and make it much easier for you to
> navigate to the source of a given gem if you ever need to see it. You
> can do this with or without rvm, or any other Ruby-version manager.

You can also kick on global caching in RVM and use Gemsets too if you
prefer to keep things at a "global" level.
Reply all
Reply to author
Forward
0 new messages