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