Isaac Sloan - Installing Ruby 2.0.0 on OSX 10.8 Mountain Lion
Banner700

Installing Ruby 2.0.0 on OSX 10.8 Mountain Lion

Step 1: Install and prepare Homebrew

ruby <(curl -fsSkL raw.github.com/mxcl/homebrew/go)
brew doctor
brew update
brew install apple-gcc42

Step 2: Install rbenv

brew install rbenv ruby-build openssl
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
source ~/.bash_profile

Step 3: Install Ruby

rbenv install 2.0.0-p0
rbenv rehash
rbenv global 2.0.0-p0
rbenv shell 2.0.0-p0
gem install bundler
rbenv rehash
echo 'gem: --no-rdoc --no-ri' >> ~/.gemrc

Step 4: Install ImageMagick and databases

brew install sqlite3
brew install imagemagick
brew install mysql

The next steps are necessary to create a mysql database.

unset TMPDIR
mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp
ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
May 26, 2013
rubyrailsosx
comments powered by Disqus