[英]Ruby version error
I'm using RVM with my 2.3.1@market
gemset and getting error while trying to run my specs saying that 我将RVM与
2.3.1@market
gemset一起使用时,在尝试运行规格时出现错误,说
Your Ruby version is 2.3.1, but your Gemfile specified 2.0.0
So I added ruby '2.3.1'
to my Gemfile but I'm still getting error that I need `2.0.0' anyway. 所以我在我的Gemfile中添加了ruby'2.3.1
ruby '2.3.1'
,但是仍然出现错误,无论如何我都需要'2.0.0'。 I've also tried to reinstall bundler, which didn't help. 我也尝试过重新安装捆绑程序,但没有帮助。
UPD: When I'm specifying any version than ruby '2.3.1'
this line isn't ignored. UPD:当我指定除
ruby '2.3.1'
以外的任何版本时,不会忽略此行。 For example if ruby '2.1.2'
is specified then I'm getting error that 例如,如果指定
ruby '2.1.2'
则出现错误
Your Ruby version is 2.3.1, but your Gemfile specified 2.1.2
but when I'm specifying ruby '2.3.1'
I'm getting 但是当我指定
ruby '2.3.1'
Your Ruby version is 2.3.1, but your Gemfile specified 2.0.0
try running 尝试跑步
gem install bundler
or 要么
gem update bundler
this may solve your problem 这可以解决您的问题
if that doesn't help then please check ruby -v
for you project and make sure that you have ruby 2.3.1
installed for that you can use rvm install 2.3.1
and make if default to your project by echo 2.3.1 > .ruby-version
如果那没有帮助,那么请为您的项目检查
ruby -v
,并确保已安装ruby 2.3.1
,可以使用rvm install 2.3.1
并通过echo 2.3.1 > .ruby-version
默认设置为项目echo 2.3.1 > .ruby-version
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.