How to Fix "Your Ruby Version Is 1.9.3, But Your Gemfile Specified 2.0.0"

How to fix Your Ruby version is 1.9.3, but your Gemfile specified 2.0.0

If you run ruby -v you're going to see that you've installed Ruby 1.9.3, but the first line in your Gemfile specifies that you want to use Ruby 2.0.0.

You should either install Ruby 2.0.0 or change the first line in your Gemfile to specify Ruby 1.9.3.

sample of Gemfile:

source 'https://rubygems.org'
ruby "1.9.3"

gem 'pry'

gem 'pry-nav'

# Use with command-line debugging, but not RubyMine
#gem 'debugger'

gem 'bundler'

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 1.9.3, but your Gemfile specified 2.1.0

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.

Your Ruby version is 1.9.3, but your Gemfile specified 2.1.0

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.

Your Ruby version is 1.9.3, but your Gemfile specified 1.9.3-p194

The ruby directive explicitly leaves out the ability to specify a
patch level. Ruby patches often include important bug and security
fixes and are extremely compatible.
http://bundler.io/v1.2/gemfile_ruby.html

The entry in your Gemfile should simply be ruby '1.9.3'

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

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.



Related Topics



Leave a reply



Submit