Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cant run rails commands. Your Ruby version is 2.2.1, but your Gemfile specified 2.1.4

I am not able to run surver rails s or cant make controllers etc. What should I do ?

Terminal showing following error:

Your Ruby version is 2.2.1, but your Gemfile specified 2.1.4
like image 326
Ankush Avatar asked Apr 22 '15 16:04

Ankush


1 Answers

Run ruby -v then you will see that you've installed ruby 2.2.1, but the first line in your Gemfile specifies to use ruby 2.1.4. Change the first line in your Gemfile to specify ruby 2.2.1 or install ruby 2.1.4 If you want to use previous version ruby 2.1.4. Then first check if it is already installed or not by using rvm list command. If it is there then you need to run rvm use ruby-2.1.4 command and if it is not there use

rvm install ruby-2.1.4

rvm use ruby-2.1.4
like image 70
sansarp Avatar answered Oct 08 '22 06:10

sansarp