-
-
Notifications
You must be signed in to change notification settings - Fork 189
Ruby
Shannon Skipper edited this page Dec 8, 2020
·
100 revisions
CRuby or MRI (Matz's Ruby Implementation), is the defacto Ruby and sets the standards for other Ruby implementations.
| Operating System | Command |
|---|---|
| Debian / Ubuntu |
|
| RedHat / Fedora |
|
| openSUSE |
sudo zypper install gcc automake bison gdbm-devel libffi-devel libyaml-devel openssl-devel readline-devel zlib-devel |
| Arch Linux |
|
| FreeBSD |
|
| NetBSD |
|
| macOS |
|
| Alpine Linux |
|
Note: MRI requires OpenSSL >= 1.0.1.
wget https://cache.ruby-lang.org/pub/ruby/2.7/ruby-2.7.2.tar.bz2
tar -xjvf ruby-2.7.2.tar.bz2
cd ruby-2.7.2
./configure --prefix=/opt/rubies/ruby-2.7.2
make
sudo make install
Note: macOS users must update their OpenSSL CA cert bundle and properly set ./configure --with-opt-dir to compile against Homebrew's libraries:
curl --remote-name https://cache.ruby-lang.org/pub/ruby/2.7/ruby-2.7.2.tar.bz2
tar -xjvf ruby-2.7.2.tar.bz2
cd ruby-2.7.2
./configure --prefix="$HOME/.rubies/ruby-2.7.2" --with-opt-dir="$(brew --prefix openssl):$(brew --prefix readline):$(brew --prefix libyaml):$(brew --prefix gdbm):$(brew --prefix libffi)"
make -j2
make install