Ryuuks
Ryuuks

Reputation: 390

Your Ruby version is 2.3.1, but your Gemfile specified 2.1.4

I'm sure this is a very common question, but I can't make it work even after following several tutorials about it. I'm using Ubuntu 16.04 lts and I just installed Ruby on Rails with Rbenv, but then, after running rails server I get the Your Ruby version is 2.3.1, but your Gemfile specified 2.1.4 message. How can I make it work?

Upvotes: 2

Views: 1555

Answers (2)

jay.pepper
jay.pepper

Reputation: 17

rvm --default use 2.1.4

rvm use 2.1.4@"folder name" --create

Upvotes: 0

B Seven
B Seven

Reputation: 45943

As Sergio pointed you, you need to update your Ruby or your Gemfile.

In my experience, there are not a lot of major changes between Ruby 2.1 and 2.3, so I suggest updating your Gemfile.

If you don't want to do that, then here is how to install Ruby 2.1.4:

rbenv install 2.1.4

Also, be sure to set the version:

rbenv local 2.1.4

ruby -v

Should return 2.1.4

rbenv reference

Upvotes: 2

Related Questions