I'm using rbenv
and I have the follow error when I execute rails s
Your Ruby version is 2.0.0, but your Gemfile specified 2.1.2
I was reading this thread: Mavericks, RBENV, Your Ruby version is 2.0.0, but your Gemfile specified 2.1.1
But the error persist.
rails -v
Your Ruby version is 2.0.0, but your Gemfile specified 2.1.2
and the commands
sudo gem install bundler
rbenv rehash
$ which ruby
/usr/bin/ruby
$ bundle exec which ruby
Your Ruby version is 2.0.0, but your Gemfile specified 2.1.2
doenst solve the problem. I'm doing something wrong?
rbenv is included in all installations of Bitnami Ruby stack that use system packages. It is a command-line tool which allows you to easily install, manage, and work with multiple Ruby environments. Every installed Ruby interpreter using rbenv is isolated in its own directory with its libraries and gems.
What version of ruby are you using?
ruby -v
It sounds like the Gemfile has a ruby requirement listed for 2.1.2. You may need to install that version:
rbenv install 2.1.2
Then you may need to tell rbenv to use that version for that project:
rbenv local 2.1.2
It looks like the rbenv team/community decided against adding support for ruby versions specified in the Gemfile. Reference: https://github.com/sstephenson/rbenv/issues/223
If you get this in a Rails project, and you recently upgraded your ruby version you might have spring running with the old version of ruby. ./bin/spring stop
will fix this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With