[英]Incorrect ruby version when installing bundle in rails project
I have a problem when running bundle install
in the root of sharetribe rails's project. 在sharetribe rails项目的根目录中运行bundle install
时遇到问题。 It shows me this error message: 它向我显示此错误消息:
Your Ruby version is 2.4.0, but your Gemfile specified 2.3.1 您的Ruby版本是2.4.0,但是您的Gemfile指定了2.3.1
I tried installing rvm and installing the 2.3.1 version required to run this project but nothing changes and it still throwing this output. 我尝试安装rvm并安装运行此项目所需的2.3.1版本,但没有任何更改,它仍然抛出此输出。
Have anyone faced this problem before ? 有人遇到过这个问题吗?
Your Ruby version is 2.4.0, but your Gemfile specified 2.3.1 您的Ruby版本是2.4.0,但是您的Gemfile指定了2.3.1
Steps to resolve this issue 解决此问题的步骤
1)rvm install ruby-2.3.1
2)gem install bundler
3)rvm use ruby-2.3.1
4)Bundle install
Your Ruby version is 2.4.0, but your Gemfile specified 2.3.1 您的Ruby版本是2.4.0,但是您的Gemfile指定了2.3.1
If you run command ruby -v
you can see that you have installed Ruby 2.4.0
, when you look at the first line in your Gemfile specifies that you want to use Ruby 2.3.1
. 如果运行命令ruby -v
您会看到已经安装了Ruby 2.4.0
,当您查看Gemfile的第一行时,即表示您要使用Ruby 2.3.1
。
You can do either install Ruby 2.3.1
or replace the first line in your Gemfile to with Ruby 2.4.0
. 您可以安装Ruby 2.3.1
或用Ruby 2.4.0
将Gemfile中的第一行替换为。
What does it say when you run bundle env
in the terminal? 在终端中运行bundle env
会说什么?
Is it the same ruby version? 是相同的红宝石版本吗?
I tried gem install bundler
one time i had the same problem and bundle updated and worked. 我曾经有同样的问题尝试过gem install bundler
并且bundle更新并工作了。
You can read more about it here . 您可以在此处了解更多信息。
Good luck! 祝好运!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.