您的Ruby版本是2.3.0,但是您的Gemfile指定了2.1.2 [英] Your Ruby version is 2.3.0, but your Gemfile specified 2.1.2
问题描述
我正在尝试设置现有项目,
运行捆绑安装
时,出现以下错误。
I'm trying to setup an existing project,
When running bundle install
, I'm getting following error.
我尝试了许多可能的解决方案,但对我没有用,我也运行了建议的命令,例如 gem pristine bcrypt --version 3.1.10
但对我不起作用。
I've tried many possible solutions but didn't worked for me, also I've run the suggested commands, like gem pristine bcrypt --version 3.1.10
but didn't work for me.
bipashant@bipashant-Inspiron-5537:~/sanokam$ bundle install
Ignoring bcrypt-3.1.10 because its extensions are not built. Try: gem pristine bcrypt --version 3.1.10
Ignoring curb-0.9.3 because its extensions are not built. Try: gem pristine curb --version 0.9.3
Ignoring debug_inspector-0.0.2 because its extensions are not built. Try: gem pristine debug_inspector --version 0.0.2
Ignoring eventmachine-1.0.3 because its extensions are not built. Try: gem pristine eventmachine --version 1.0.3
Ignoring executable-hooks-1.3.2 because its extensions are not built. Try: gem pristine executable-hooks --version 1.3.2
Ignoring ffi-1.9.8 because its extensions are not built. Try: gem pristine ffi --version 1.9.8
Ignoring gem-wrappers-1.2.7 because its extensions are not built. Try: gem pristine gem-wrappers --version 1.2.7
Ignoring gherkin-2.12.2 because its extensions are not built. Try: gem pristine gherkin --version 2.12.2
Ignoring http_parser.rb-0.5.3 because its extensions are not built. Try: gem pristine http_parser.rb --version 0.5.3
Ignoring kgio-2.8.1 because its extensions are not built. Try: gem pristine kgio --version 2.8.1
Ignoring mysql2-0.3.14 because its extensions are not built. Try: gem pristine mysql2 --version 0.3.14
Ignoring nokogiri-1.6.7 because its extensions are not built. Try: gem pristine nokogiri --version 1.6.7
Ignoring ruby-prof-0.14.2 because its extensions are not built. Try: gem pristine ruby-prof --version 0.14.2
Your Ruby version is 2.3.0, but your Gemfile specified 2.1.2
更新1
Update 1
bipashant@bipashant-Inspiron-5537:~/sanokam$ rvm list
rvm rubies
=* ruby-2.1.2 [ x86_64 ]
ruby-2.3.0 [ x86_64 ]
ruby-2.3.1 [ x86_64 ]
# => - current
# =* - current && default
# * - default
我还有一个ruby版本的Gemfile。
And also I've a ruby version Gemfile.
source 'http://rubygems.org'
ruby '2.1.2'
任何建议都会受到赞赏,谢谢。
Any suggestion will be appreciated, Thank you.
推荐答案
错误似乎很清楚。您要么更改Gemfile中指定的ruby版本,要么通过执行 rvm use 2.1.2
更改所使用的ruby版本。您可以使用 rvm --default使用2.1.2
使其成为默认版本。
The error seems pretty clear. You either have to change the ruby version specified in your Gemfile, or change the ruby version you are using by doing rvm use 2.1.2
. You can use rvm --default use 2.1.2
to make it the default version.
这篇关于您的Ruby版本是2.3.0,但是您的Gemfile指定了2.1.2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!