cihjha
Last Updated: February 25, 2016
·
13.94K
· deioo
Eda433919081094aef00e8dc7994ac0a

Install ruby 2.1.1 with brew and rbenv

Assuming you have homebrew and rbenv already installed, run the following:

brew update
brew upgrade ruby-build
rbenv install 2.1.1

This will update brew, upgrade ruby-build and install ruby 2.1.1 in 3 easy steps.

Say Thanks
Respond

7 Responses
Add your response

14533
500x500

If you run into this error:

The Ruby openssl extension was not compiled. Missing the OpenSSL lib?

Try:

brew install openssl

RUBY_CONFIGURE_OPTS=--with-openssl-dir=/usr/local/Cellar/openssl/1.0.1e rbenv install 2.1.1

https://github.com/sstephenson/ruby-build/issues/377#issuecomment-21014365

over 1 year ago ·
14792
9419ae9829cb341c01f55143d08d0f2e

or you can:

$ brew link readline openssl --force
$ rbenv install 2.1.2

that helps me... you can then unlink those if you wish

over 1 year ago ·
14878
9f5d5ab621391df9abde916cb1535697

Awesome post man! Thanks!

over 1 year ago ·
15241
5fc41f1d47594bd31e026cf4b63670ee

For some reason "brew upgrade ruby-build" did not update rbenv list.
<br />The trick I found was to manually pull update:
<br />cd ~/.rbenv
<br />git pull
<br />cd plugins/ruby-build
<br />git pull

over 1 year ago ·
15312
5778573eb2298db451321de8dcd61504

+1 for wihodges! Same problem for me

over 1 year ago ·
17217
Eda433919081094aef00e8dc7994ac0a

Updating still works fine for 2.1.3 too

over 1 year ago ·
17477
Eda433919081094aef00e8dc7994ac0a

Also works for ruby 2.1.4

over 1 year ago ·