简体   繁体   中英

rbenv Your Ruby version is 2.0.0, but your Gemfile specified 2.1.2 but the only version installed is 2.1.2

I'm using rbenv but I can run my server with: rails s display me an error with:

Your Ruby version is 2.0.0, but your Gemfile specified 2.1.2

I tried uninstall the version 2.0.0 but this version doesn't exist rbenv unistall 2.0.0

And I tried with: rvm implode -bash: rvm: command not found because I'm not using rvm , what I can do to run my server?

And my ruby build says:

$ ruby-build --version
ruby-build 20141113

You just need to install Ruby 2.1.2. You can have multiple Ruby versions installed at the same time. If you have ruby-build installed you can do the following: install 2.1.2, rehash your shims, and then tell rbenv to use 2.1.2 for this project.

rbenv install 2.1.2
rbenv rehash
rbenv local 2.1.2

You're going to have to gem install bundler and then bundle install on your project afterwards.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM