Your Ruby version is 1.9.3, but your Gemfile specified 2.1.0

爷,独闯天下 提交于 2019-11-30 23:11:19
mpapis

The problem is your PATH environment variable, it has to match GEM_PATH and in your case it does not. To fix it run:

rvm get stable --auto-dotfiles

This will update your shell initialization files and make sure rvm is properly loaded. Then open a new terminal (close the application and open it again), and run:

rvm use 2.1.0

On both steps read all the messages printed to you. They are important and contain information about how to fix your problems. RVM detects problems and tries to fix them or warns you about them if they can not or should not be fixed automatically.

I had a similar issue, and used @mpapis advises, fixing my $PATH and rvm loading.

But I had to run gem install bundler to update bundler and make it recognize my current ruby version again.

I'd recommend using a .ruby-version file in the top-level directory of your project. That file would contain containing the ruby version spec'd in your Gemfile, e.g.

2.1.0

That apparently is the cross-{rbenv,rvm} way of spec'ing the version now.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!