32

I have tried installing Ruby 2.0.0 using RVM:

  rvm install 2.0.0

Once installation is done. I did rvm list. It shown like below:

rvm rubies

   jruby-1.6.5.1 [ i386 ]
   /home/username/.rvm/scripts/list: line 294: /home/username/.rvm/rubies/rbx-2.0.0/config: No such file or directory
rbx-2.0.0 [  ]
=* ree-1.8.7-2011.12 [ i686 ]
   ruby-1.9.3-p0 [ i686 ]

# => - current
# =* - current && default
#  * - default

Why did it install Rubinius 2.0-rc1 ?? did anyone face this issue?? Any help??

Thanks :)

Rahul Tapali
  • 9,887
  • 7
  • 31
  • 44

5 Answers5

79

Your rvm is probably not up to date, and by doing so the list of installable rubies also. Rvm probably took the best match, that was Rubinius 2

When you do

rvm list known

You obtain the list of known rubies that you can install

This list is updated at the same time you update rvm. Then you need to update rvm before installing MRI Ruby 2.0.0

rvm get stable
Community
  • 1
  • 1
toch
  • 3,905
  • 2
  • 25
  • 34
  • 3
    I did `rvm get head`. it worked !!. I think `rvm get stable` also works. – Rahul Tapali Feb 27 '13 at 10:22
  • Nice to hear. I can tell you rvm get stable works, I try it this morning. – toch Feb 27 '13 at 11:33
  • @codeit The difference between `head` and `stable` is alluded to [here](https://rvm.io/support/troubleshooting). The `head` version is, according to that page, for the "more adventurous." – Wayne Conrad Mar 11 '14 at 12:24
  • 1
    I found that the RVM installed by Ubuntu was very broken. [This question](http://stackoverflow.com/questions/9056008/installed-ruby-1-9-3-with-rvm-but-command-line-doesnt-show-ruby-v/9056395#9056395) resolved all my issued however. – Dave Sag Apr 08 '14 at 08:38
5

First, make sure you have the latest RVM:

rvm get stable

After installing RVM, run the relevant libyaml installation for your system:

Debian-based systems:

apt-get install libyaml-dev

Fedora/CentOS/RHEL systems:

yum install libyaml-devel

Mac with Homebrew:

brew install libyaml

Lastly:

rvm pkg install openssl
rvm install 2.0.0 \ 
    --with-openssl-dir=$HOME/.rvm/usr \
    --verify-downloads 1
rvm use 2.0.0
DreadPirateShawn
  • 8,164
  • 4
  • 49
  • 71
dayanthan
  • 51
  • 1
  • 1
2

When you do

rvm list known

You obtain the list of known rubies that you can install

This list is updated at the same time you update rvm. Then you need to update rvm before installing MRI Ruby 2.0.0

Update rvm to the latest version

rvm get stable

Then try installing ruby

rvm install 2.0.0

if there is any error, such as missing packages, it will be listed. Install those packages for debian-based systems using

Use yum install / brew install for Fedora/CentOS/RHEL systems , Mac with Homebrew respectively

apt-get install "your missing packges"

eg:
sudo apt-get install libsigsegv2 gawk libgdbm-dev libffi-dev

once the missing packages are installed.

try installing ruby 2.0.0

rvm install 2.0.0
RubyMiner
  • 311
  • 2
  • 12
0

There's some good instructions at https://coderwall.com/p/tptocq, includes setting up libyaml and openssl.

opsb
  • 29,325
  • 19
  • 89
  • 99
0

You can do rvm use 2.0.0.

If it tells you that you have it not installed, you just do:

rvm install ruby-2.0.0-p598

It will install everything that you need for you and then you can select which version of Ruby to use with rvm use

Nicolas Yuste
  • 673
  • 9
  • 15