Reputation: 121
I'm getting the following bug when I run rails c
:
Your Ruby version is 2.1.2, but your Gemfile specified 2.2.2
When I run $rvm list rubies
, I get the following:
rvm rubies
=* ruby-2.2.2 [ x86_64 ]
I am confused. I tried to change the Ruby version in the Gemfile to 2.1.2 and install ruby-2.1.2. However I still get:
Your Ruby version is 2.2.2, but your Gemfile specified 2.1.2
Any suggestions?
Upvotes: 3
Views: 319
Reputation: 16393
Neither answer worked for me, and I already had 2.2.2 installed and specified in .ruby-version. What worked for me was
rvm use 2.1.2
rvm use 2.2.2
and then everything works fine. I suspect that rvm was somehow confused.
Declaration: In reality, I had this problem with swapping between 2.5.9 and 2.7.3.
Upvotes: 0
Reputation: 503
Please install ruby-2.2.2 on your system then do either one of these:
1. rvm use ruby-2.2.2
2. create a .ruby-version file inside your application root folder with the following content:
2.2.2
Upvotes: 2