Specify RVM Gemset for Each App

Using rvm is always a bit confusing for me – I never fully understand exactly how its working. One thing I learned recently was how to specifcy a specific gemset for an app. I think when you refresh a terminal session, rvm switches back to the default gemset. I was upgrading to Rails 5, and I wanted to specificy to use my rails5.0 gemset with my app for testing. Here’s how you do it:

 rvm --ruby-version use 1.9.3@my_app

where my_app is the name of your gemset. This creates two files in the root of your application: .ruby-version and .ruby-gemset. These files specify the ruby version and gemset to use for your app.

Hope that makes sense, and if its wrong please let me know!

credit here, here, and here

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: