mpapis' instructions are great, but didn't completely cover all the issues when I tried them, so this is what I had to do. Every time I install RVM on a legacy system it's a real trial. The below is far from perfect and it took almost an hour, but it got me Ruby 1.9.3 on 10.5.8.
The big picture (stuff that isn't always explained):
- RVM is designed to run under your user account, NOT as root with
sudo
, so these commands are to be entered without sudo
, just as shown.
- Heeding mpapis' warning, I found that Ruby-1.9.3-p448 will work with gcc version 4.0.1 which comes with 10.5.8, but other Rubies may not.
- Some libraries Ruby requires initiate an install of MacPorts, e.g. if done like this:
rvm pkg install zlib
, but pkg
has been deprecated, so enter rvm help autolibs
to read more…
- …you may prefer something else to MacPorts, but after letting
rvm pkg install zlib
do its thing I gave in and later, my RVM install of Ruby used it nicely.
- Installing Ruby may take a very long time and appear to be doing nothing (you might see
Installing required packages: autoconf, automake, [etc.] gdbm, ncurses........
followed by even more very slowly-appearing lines of ..........
), but it will finish.
- During these processor-intensive installs your computer's fan will probably spin up to maximum speed for some time :-)
Get the rvm-install script (the k
option by-passes SSL warnings):
curl -Lk get.rvm.io -o rvm-installer
Prevent the BASH version check
Manually comment out the lines that check your version of bash
(lines 3-11) in the 'rvm-installer' script (reason: OS X 10.5.8 has BASH 3.2.17 and the script warns: BASH 3.2.25 required (you have 3.2.17(1)-release)
.
Run the installer
Make sure the rvm-installer script is executable:
chmod +x rvm-installer
Just run the script as below to get RVM (the suggested command /rvm-installer -s stable
might only bring up the Usage
document):
./rvm-installer
You should then see:
Downloading RVM from wayneeseguin branch master
if you get SSL certificate problem
, allow curl
to do an 'insecure' download then run the script again:
echo insecure >> ~/.curlrc
./rvm-installer
Start using RVM and install Ruby
To start using RVM right away enter:
source /Users/your_user_name/.rvm/scripts/rvm
To install Ruby 1.9.3 (safest option with standard 10.5 libraries) you should now be able to enter:
rvm install 1.9.3
(long process here - see point 5 above). Then to use your new Ruby, enter:
rvm use 1.9.3