Where developers come to connect, share, build and be inspired.

313

Installing ruby 2.0.0 with RVM

64801 views

Ruby 2.0.0 was released on February 24, 2013, on the 20th anniversary of Ruby's inception. Test out your apps and gems so you can be ready. You must install libyaml because Ruby 2.0.0 deprecated syck in favor of psych.

Make sure you have the latest RVM:

rvm get stable

Just run this in your favorite terminal after installing RVM:

# For Debian-based systems
apt-get install libyaml-dev

# For Fedora/CentOS/RHEL systems
yum install libyaml-devel

# For Mac with Homebrew
brew install libyaml

rvm pkg install openssl
rvm install 2.0.0 \ 
    --with-openssl-dir=$HOME/.rvm/usr \
    --verify-downloads 1
rvm use 2.0.0

Enjoy!

Comments

  • Blank-mugshot
    krisleech

    rvm get stable && rvm install ruby-2.0.0

  • Blank-mugshot
    bridgeutopia

    rvm install 2.0.0 should work better.

  • Endel-rubyconfar-avatar
    endel

    Nice, I've had to install this way: (maybe I have an old rvm version?)

    rvm install ruby-2.0.0-preview1  --with-openssl-dir=$HOME/.rvm/usr --verify-downloads 1
    

  • 1442980_300
    shuhei

    In addition, I had to use rvm master instaed of rvm latest.

  • Blank-mugshot
    petenicholls

    I used RVM stable. I had to export CC=clang before the RVM install on OS X.

  • Blank-mugshot
    gaveen

    For Fedora/CentOS/RHEL the package should be: libyaml-devel

    yum install libyaml-devel

  • Blank-mugshot
    pzgz

    This worked on my mac os x moutain lion 10.8.3, resolved the openssl issue.

  • Blank-mugshot
    johnkpush

    Hey Eric. I had you pegged as more of a JRuby kind of guy :)

  • Blank-mugshot
    mpapis

    in the latest updates for RVM it is enough to:

    rvm get head
    rvm pkg remove
    rvm install ruby
    

  • Blank-mugshot
    rafapolo

    rvm pkg is obsolete. what did the trick for me in OSX was: brew install openssl; rvm install 2.0.0 --autolibs=1

  • Blank-mugshot
    coolzilj

    $ curl -L get.rvm.io | bash -s stable
    $ rvm install 2.0.0
    

    works for me.

    I met SSL error when doing $ rvm get stable

  • Blank-mugshot
    antoniorosado

    @endel same here.

  • Blank-mugshot
    eriwen

    @johnkpush: Love 'em both :)

  • Blank-mugshot
    pixel67

    @krisleech same

  • Blank-mugshot
    i3zhe

    @mpapis hi there, I followed your steps, but still get the ssl issue, any idea?

    gem install rails --version 4.0.0.beta1

    ERROR: Loading command: install (LoadError) cannot load such file -- openssl ERROR: While executing gem ... (NoMethodError) undefined methodinvokewithbuild_args' for nil:NilClass`

  • Blank-mugshot
    mpapis

    @i3zhe check rvm issues or open new one if the problem was not mentioned there yet => https://github.com/wayneeseguin/rvm/issues/

  • Me_normal
    gabceb

    hey @i3zhe I just had the same issue. Try running brew install openssl That worked for me

  • Blank-mugshot
    i3zhe

    @gabceb thanks, will try later at home

  • Blank-mugshot
    eriwen

    @rafapolo I'm getting "Unrecognized command line flag: '--autolibs=1'" when trying your solution. I have the latest stable rvm, so is there anything else we need to do for that flag?

  • 1a2871c
    benackles

    If I'm not mistaken, Rails 4.0.0 (beta) isn't using Ruby 2.0.0 (preview). Every time I followed your instructions it all worked until I checked the version number of both rails --version and ruby --version. Installing Ruby 2.0.0 forces you to use an older version of Rails, in my case Rails 3.2.13. Do you know if the final release of Rails 4.0.0 is expected to use Ruby 2.0.0?

  • Blank-mugshot
    jaredphillips

    Worked like a charm, thank you

  • Blank-mugshot
    rajcybage

    For Ubuntu Also sudo apt-get install libreadline6-dev autoconf libgdbm-dev libncurses5-dev automake libtool libffi-dev

  • Blank-mugshot
    rajcybage

    If got Error

    Error running 'make -j8' or j2

    rvm get stable rvm autolibs enable rvm install ruby || rvm install ruby --with-gcc=clang

  • Blank-mugshot
    rupakg

    For older versions of rvm,

    rvm get head
    rvm reload
    rvm get stable
    

    And, on OSX, you might have to update to XCode 4.6.2

  • Default_profile_5_normal
    jakub_kuchar

    getting error with rubygems on ubuntu, i've tried omiting ssl option and it worked

  • Blank-mugshot
    angelbotto

    thanks for share

  • Blank-mugshot
    angelbotto

    thanks for share

  • Blank-mugshot
    gouravtiwari

    nice tip

  • Blank-mugshot
    keilmillerjr

    $ rvm install 2.0.0 worked just fine for me.

  • Fc7cc619871d573d4820eb7b97e256c1_normal
    cwithoutfail

    To make it default: rvm use --default 2.0.0

  • Blank-mugshot
    epicgamexz

    rvm install 2.0.0-p353 work for me.

Add a comment