Your Ruby version is 2.3.1, but your Gemfile speci

2019-07-09 04:29发布

I am trying to upgrade from ruby 2.3.0 to 2.4.1. To do this, I did rvm use 2.4.1@my-project --create (I am already using 2.4.1 for another project). I changed the gemfile from ruby "2.3.0" to ruby "2.4.1", and I ran bundle install. My gemfile.lock correctly changed.

However, when trying to run rails s in console, I have the error:

Your Ruby version is 2.3.1, but your Gemfile specified 2.4.1

This is not logical because when I am running which ruby I get the following answer : /.rvm/rubies/ruby-2.4.1/bin/ruby. ruby -v answers ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux]. Furthermore I have never used 2.3.1 for any of my projects; when running rvm list in console, I do not see that version of ruby.

Is it possible that there is a conflict with rails? I am using rails 4.2.7.1

I tried all the answered given in the following stackoverflow issues:

So I am kind of running out of ideas. Thank you for your help!

标签: ruby rvm
1条回答
\"骚年 ilove
2楼-- · 2019-07-09 04:47

I faced same issue, stopping spring and clearing tmp, which includes bootsnap cache worked for me

spring stop
rake tmp:clear
查看更多
登录 后发表回答