简体   繁体   English

无法运行rails命令。您的Ruby版本是2.2.1,但您的Gemfile指定为2.1.4

[英]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.

相关问题 您的 Ruby 版本是 2.3.1,但您的 Gemfile 指定了 2.1.4 - Your Ruby version is 2.3.1, but your Gemfile specified 2.1.4 您的Ruby版本是2.1.3,但是您的Gemfile指定了2.2.1 - Your Ruby version is 2.1.3, but your Gemfile specified 2.2.1 您的Ruby版本是1.9.3,但是您的Gemfile指定了2.2.1 - Your Ruby version is 1.9.3, but your Gemfile specified 2.2.1 Rails服务器错误:Ruby版本是1.8.7,但您的Gemfile指定为1.9.3 - Rails Server Error: Ruby version is 1.8.7, but your Gemfile specified 1.9.3 使用RVM在ruby 2.2.0上安装rails 4.2生成“你的Ruby版本是2.2.0,但你的Gemfile指定为2.1.5” - installing rails 4.2 on ruby 2.2.0 using RVM generates “Your Ruby version is 2.2.0, but your Gemfile specified 2.1.5” 您的Ruby版本是2.3.1,但是您的Gemfile指定了2.3.1(相同版本) - Your Ruby version is 2.3.1, but your Gemfile specified 2.3.1 (same version) 修复rbenv和rails 5.2的“您的Ruby版本为2.4.4,但您的Gemfile指定了2.5.1”的错误 - Fixing 'Your Ruby version is 2.4.4, but your Gemfile specified 2.5.1' error with rbenv and rails 5.2 Rails控制台内的Vim-您的Ruby版本是2.0.0,但是您的Gemfile指定了2.1.2 - Vim inside rails console - Your Ruby version is 2.0.0, but your Gemfile specified 2.1.2 您的Ruby版本是2.3.0,但您的Gemfile指定为2.1.2 - Your Ruby version is 2.3.0, but your Gemfile specified 2.1.2 rbenv您的Ruby版本是2.0.0,但您的Gemfile指定为2.1.2 - rbenv Your Ruby version is 2.0.0, but your Gemfile specified 2.1.2
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM