tptocq
77.28K
· November 2012 ·
B668360f53c9975bca11992742e2effe

Installing ruby 2.0.0 with RVM

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!

Sign in or sign up to add your response.

31 Responses

1135
Endel rubyconfar avatar

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
over 1 year ago ·
1335
9ed473dbb7dfeac9abc200f40254670c

@endel same here.

over 1 year ago ·
1733
1442980 300

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

over 1 year ago ·
2807
Ca3dc3f93730afb41d6753d8bf010a38

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

over 1 year ago ·
3237
45b9ba1e48c6868a0efe94ad68a053fb

rvm install 2.0.0 </code>
should work better.

over 1 year ago ·
4365
Eea09ae62533e44d90e78edfd64a43d2

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

yum install libyaml-devel

over 1 year ago ·
4370
5894706ab8c4aa40257d022e28129f66

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

over 1 year ago ·
4374
Kris avatar

rvm get stable && rvm install ruby-2.0.0

over 1 year ago ·
4380
32f641254c242ae6b2ecc60f42eb2896

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

over 1 year ago ·
4381
B668360f53c9975bca11992742e2effe

@johnkpush: Love 'em both :)

over 1 year ago ·
4389
2af4ea9bb6380b59d05d2b9b6d8112e9
over 1 year ago ·
4430
3ec52ed58eb92026d86e62c39bdb7589

in the latest updates for RVM it is enough to:

rvm get head
rvm pkg remove
rvm install ruby
over 1 year ago ·
4452
61ad912b724a2554976edd74ee6e0266

@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 method
invokewithbuild_args' for nil:NilClass`

over 1 year ago ·
4453
3ec52ed58eb92026d86e62c39bdb7589

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

over 1 year ago ·
4466

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

over 1 year ago ·
4467
61ad912b724a2554976edd74ee6e0266

@gabceb thanks, will try later at home

over 1 year ago ·
4611
D9fb469ab152945e404662a0acef90b9

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

over 1 year ago ·
4622
B668360f53c9975bca11992742e2effe

@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?

over 1 year ago ·
4845
457b512e12b94445fc447f37342b5693
$ 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

over 1 year ago ·
5270
1a2871c

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?

over 1 year ago ·
5395
7ad3893d3da163170bf0e2dc1495e77a

Worked like a charm, thank you

over 1 year ago ·
5701
C37274ca585ba6be6b5af54e4ad20c8f

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

over 1 year ago ·
5702
C37274ca585ba6be6b5af54e4ad20c8f

If got Error

Error running 'make -j8' or j2

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

over 1 year ago ·
6346
E40e0d06ed05f17385dee72a56cfda48

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

over 1 year ago ·
7076
Default profile 5 normal

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

over 1 year ago ·
7349
38fac07694b5d75005e507607e502634

thanks for share

over 1 year ago ·
7350
38fac07694b5d75005e507607e502634

thanks for share

over 1 year ago ·
8553
Febcde7f09d486161ab6b3180c8b85c7

nice tip

over 1 year ago ·
8601
8cf5de58d70dd40e284f21777fca4d2d

$ rvm install 2.0.0 worked just fine for me.

over 1 year ago ·
11846

To make it default: rvm use --default 2.0.0

over 1 year ago ·
12564
4ef3524f9f52da1e7b9cd75ac997cfb9

rvm install 2.0.0-p353 work for me.

over 1 year ago ·
Featured Programming Job

Software Engineer, Backend (m/w)
·
Berlin, Dortmund, Erfurt, Möncheng
·
Full Time
Search all programming jobs