Create .ruby-version and .ruby-gemset with rvm Create .ruby-version and .ruby-gemset with rvm ruby-on-rails ruby-on-rails

Create .ruby-version and .ruby-gemset with rvm


I recently had the same problem. rvm --help led me to:

rvm --create --ruby-version ruby-1.9.3@my-gemset  

It created both .ruby-gemset and .ruby-version.


According to the official RVM docs you can use this:

echo 1.9.3 > .ruby-version

Or you can use this:

rvm --ruby-version use 1.9.3@my_app

The second form will create both .ruby-version and .ruby-gemset.


Suppose I am creating gemset for my rails app whose name is tptapp then we can do it in following way.

rvm use 2.2.2@tptapp --create

here tptapp is name of gemset, 2.2.2 is Ruby version.