0
votes

I ran into a problem where I had to use an earlier rails version to use a particular gem.

When researching how to cope with this issue I got a bit confused. I found solutions suggesting rvm/rbenv and create gemsets. As it's possible to install previous versions of Rails and gems on the same machine I'd like to understand why not just use bundler deal with this. What would be scenario where I'd need rvm or rbenv

Thanks Zin

1

1 Answers

2
votes

It's a matter of personal preference, which one you use. I use rvm, personally. I use it for managing rubies across my entire system, all the time. Once I install it, I switch my default ruby to the latest, and then when I create a new rails app, the first thing I do (before git init) is create a gem set:

 rvm use --create --ruby-version 2.3@myProjectName

These options will automatically create a gemset, switch to ruby 2.3, and create the necessary .ruby-version and .ruby-gemset files to make it so RVM will automatically switch to them when you enter the context of that project.

It's really handy, definitely recommended.