9

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
Ankush
  • 2,405
  • 3
  • 22
  • 45

2 Answers2

16

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
sansarp
  • 1,446
  • 11
  • 18
0

It might be using your system ruby version

In your apache config use:

To find your path use passenger-config about ruby-command

PassengerRuby /home/user/.rbenv/versions/2.2.1/bin/ruby

Source: phusion passenger docs

tread
  • 10,133
  • 17
  • 95
  • 170