How to fix “Your Ruby version is 2.3.0, but your G

2019-01-22 18:46发布

I am getting this error while running server, how do I fix this?

enter image description here

7条回答
走好不送
2楼-- · 2019-01-22 19:05

For $ Your Ruby version is 2.3.0, but your Gemfile specified 2.4.1. Changed 2.4.1 in Gemfile to 2.3.0

查看更多
老娘就宠你
3楼-- · 2019-01-22 19:07

Add the following to your Gemfile

ruby '2.3.0'
查看更多
我想做一个坏孩纸
4楼-- · 2019-01-22 19:15

Your Gemfile has a line reading

ruby '2.2.5'

Change it to

ruby '2.3.0'

Then run

bundle install
查看更多
冷血范
5楼-- · 2019-01-22 19:18

You better install Ruby 2.2.5 for compatibility

If you're using rvm:

rvm install 2.2.5
rvm use 2.2.5

else if you're using rbenv:

rbenv install 2.2.5
rbenv local 2.2.5

else if you can not change ruby version by rbenv, read here

查看更多
爷的心禁止访问
6楼-- · 2019-01-22 19:22

I am on Mac OS Sierra. I had to update /etc/paths and add /Users/my.username/.rbenv/shims to the top of the list.

查看更多
Evening l夕情丶
7楼-- · 2019-01-22 19:23

If you are using rbenv then make sure that you run the "rbenv rehash" command after you set local or global ruby version. It solved the issue for me.

rbenv rehash
查看更多
登录 后发表回答