Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

rbenv: version `2.0.0' is not installed

I'm trying to install the Gemfile contents using Bundle install but getting the error

rbenv: version `2.0.0' is not installed 

The version of ruby installed in my system is:

ruby 2.1.2p95 (2014-05-08 revision 45877) [i686-linux] 

and rbenv

 2.1.2 (set by /home/jay/.rbenv/version)  2.1.3 

The Gemfile requires ruby "2.0.0". Can any one tell how to install the required version without affecting the existing ones.

like image 972
iJade Avatar asked Apr 09 '15 12:04

iJade


People also ask

How do I know if Rbenv is installed?

You can see if it is using rbenv by typing which ruby and it should print something out with . rbenv/ whatever. If not you need to set rbenv as your current ruby. You can do that like rbenv global 2.1.

Where is Rbenv installed?

If rbenv is run as the root user then it will be installed to /usr/local/rbenv, otherwise it will be installed to the users ~/. rbenv directory. To make rbenv available in the shell you may need to add the rbenv/shims and rbenv/bin directories to the users PATH.


2 Answers

You can find a lot of information here: rbenv on github

To list all available installation candidates:

rbenv install -l 

To install a ruby version you need (for example):

rbenv install 2.0.0-p643 

So that you will only use this ruby version in this specific folder and not affect anything else you can do:

rbenv local 2.0.0-p643 

This will generate a .ruby-version file in that directory which will force rbenv to use this ruby version here.

like image 105
IngoAlbers Avatar answered Sep 20 '22 17:09

IngoAlbers


Just run:

rbenv install 2.0.0-p643 

Which is the lastest 2.0.0 version.

If that version is not available on your system, run ruby-build --definitions to pick the lastest known 2.0.0 version on your system.

like image 39
spickermann Avatar answered Sep 23 '22 17:09

spickermann