Skip to content

Instantly share code, notes, and snippets.

@nbrew
Created March 28, 2012 20:21
Show Gist options
  • Save nbrew/2230186 to your computer and use it in GitHub Desktop.
Save nbrew/2230186 to your computer and use it in GitHub Desktop.
RVM, Ruby 1.8.7/1.9.3 on Mac OS X 10.6
#!/bin/bash
# If rvm is already installed:
# rvm implode
# install rvm
bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
# install ruby requirements specific to the rvm env:
rvm pkg install readline && rvm pkg install iconv
# install 1.9.3 requirements (libgpg-error and libksba):
cd /usr/local/src
wget ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-1.10.tar.bz2
cd ../build
tar -jxvf ../src/libgpg-error-1.10.tar.bz2
cd libgpg-error-1.10/
./configure --prefix=/usr/local && make && sudo make install
cd /usr/local/src
wget http://anduin.linuxfromscratch.org/sources/BLFS/svn/l/libksba-1.2.0.tar.bz2
cd ../build
tar -jxvf ../src/libksba-1.2.0.tar.bz2
cd libksba-1.2.0/
./configure --prefix=/usr/local && make && sudo make install
# install rubies using rvm
for r in 1.8.7 1.8.7-p334 1.9.3; do
rvm install --trace $r -C --with-iconv-dir=$HOME/.rvm/usr
# rvm use $r
# rvm gemset create rails2
# rvm gemset use rails2
# gem install rails -v2.3.14
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment