How to fix Your Ruby version is 2.3.0, but your Gemfile specified 2.2.5 while server starting
You better install Ruby 2.2.5 for compatibility. The Ruby version in your local machine is different from the one declared in Gemfile.
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
Your Ruby version is 2.0.0, but your Gemfile specified 2.1.0
Run
gem install bundler
or
gem update bundler
which may fix your problem.
For all new installed versions of Ruby you should update or install a new bundler.
Why do I get the error Your Ruby version is 2.0.0, but your Gemfile specified 2.2.2 although I have 2.2.2 installed
I finally solved my problem using this thread Bundler not working with rbenv, could not find [gem],
by using these commands after reinstalling rbenv:
gem install --no-ri --no-rdoc bundler
rbenv rehash
bundle --path=vendor/bundle
rbenv Your Ruby version is 2.0.0, but your Gemfile specified 2.1.2 but the only version installed is 2.1.2
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.
rbenv Your Ruby version is 2.0.0, but your Gemfile specified 2.1.2
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
Your Ruby version is 2.1.0, but your Gemfile specified 2.0.0
You may need to update your version of ruby-build
to make sure you have the update where ruby-2.0.0-dev
switched to follow the ruby_2_0_0
branch.
Try running ruby-build --version
and make sure it's one of these (or later):
- v20130907
- v20130901
- v20130806
- v20130628
- v20130518
- v20130514
- v20130501
- v20130408
- v20130227
- v20130226
- v20130225
If not, run brew upgrade ruby-build
.
Related Topics
How to Call Shell Commands from Ruby
Rbenv Not Changing Ruby Version
Sudo Gem Install' or 'Gem Install' and Gem Locations
Ruby: What Does 'Require: False' in Gemfile Mean
Optional Argument After Splat Argument
Gem Installation Error: You Have to Install Development Tools First (Windows)
Altering the Primary Key in Rails to Be a String
How to Convert a Ruby Hash Object to Json
Rvm and Thin, Root Vs. Local User
How to Prevent Browser Page Caching in Rails
How to Understand Symbols in Ruby
Rails :Dependent =≫ :Destroy VS :Dependent =≫ :Delete_All
Is There an Efficient Way to Perform Hundreds of Text Substitutions in Ruby
Why Does String Interpolation Work in Ruby When There Are No Curly Braces
How to Use Ruby/Rails Variables Inside Sass
Error Installing Libv8: Error: Failed to Build Gem Native Extension