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

Tyler DeWitt picture Tyler DeWitt · Jan 15, 2014 · Viewed 29.3k times · Source

Is there a way to create the associated .ruby-version and .ruby-gemset files when creating a new gemset?

With older versions of rvm, one could do rvm --create --rvmrc 1.8.7@project, but that creates .rvmrc files.

I thought I read somewhere we could use the --ruby-version command line switch, but I have been unsuccessful in doing so.

Answer

cappie013 picture cappie013 · Apr 24, 2014

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.