Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Your Ruby version is 2.0.0, but your Gemfile specified 2.1.0

Tags:

ruby

gemfile

When I try to bundle install I get the following message:

Your Ruby version is 2.0.0, but your Gemfile specified 2.1.0 

In my Gemfile I have the following:

ruby '2.1.0' 

And when I run ruby -v in the console I get:

ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-darwin12.0] 

What does Ruby 2.1.0p0 mean? What version should I have in my Gemfile and why does the error tell me I have Ruby version 2.0.0?

like image 632
stecd Avatar asked Apr 13 '14 05:04

stecd


People also ask

How do I change my Gemfile version?

Process: install the gem generically, looking up your target version on rubygems.org, then update and version your Gemfile. the install command is in the right-hand column. then you can: gem install gem_name -v 1.5.

What is Gemfile Ruby?

A Gemfile is a file we create which is used for describing gem dependencies for Ruby programs. A gem is a collection of Ruby code that we can extract into a “collection” which we can call later. It lets you specify which gems you want to use, and which versions of these gems to use.

How do I choose a ruby version?

Selecting a version of Ruby You can use the ruby keyword in your app's Gemfile to specify a specific version of Ruby.


1 Answers

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.

like image 63
Philidor Avatar answered Sep 24 '22 13:09

Philidor