[英]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 ? 我无法运行surver
rails s
或者无法控制器等。我该怎么办?
Terminal showing following error: 终端显示以下错误:
Your Ruby version is 2.2.1, but your Gemfile specified 2.1.4
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
. 运行
ruby -v
然后你会看到你已经安装了ruby 2.2.1,但你的Gemfile中的第一行指定使用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. 更改Gemfile中的第一行以指定
ruby 2.2.1
或安装ruby 2.1.4
如果要使用以前版本的ruby 2.1.4。 Then first check if it is already installed or not by using rvm list
command. 然后首先使用
rvm list
命令检查是否已安装。 If it is there then you need to run rvm use ruby-2.1.4
command and if it is not there use 如果它在那里你需要运行
rvm use ruby-2.1.4
命令,如果它没有使用
rvm install ruby-2.1.4
rvm use ruby-2.1.4
It might be using your system ruby version 它可能正在使用您的系统ruby版本
In your apache config use: 在你的apache配置中使用:
To find your path use passenger-config about ruby-command
要查找路径,请使用
passenger-config about ruby-command
PassengerRuby /home/user/.rbenv/versions/2.2.1/bin/ruby
Source: phusion passenger docs 来源: phusion乘客文档
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.