Isaac Sloan - Setting up Ruby on Rails for OSX (10.10) Yosemite
Banner700

Setting up Ruby on Rails for OSX (10.10) Yosemite

Very little has changed since Mavericks but here's an updated tutorial.

Step 1: Install XCode Command Line Tools

xcode-select --install

Step 2: Install and prepare Homebrew

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew doctor
brew update

Step 3: Install rbenv

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

Step 4: Install Ruby

Run rbenv install --list and choose the version of ruby that you want.

rbenv install --list
Available versions:
  2.1.5
  2.2.0-dev
  2.2.0-preview1
  2.2.0-preview2
  2.2.0-rc1
  2.2.0
  2.2.1
  2.3.0-dev
rbenv install 2.2.1
rbenv rehash
rbenv global 2.2.1
gem install bundler
gem install rails
rbenv rehash
echo 'gem: --no-rdoc --no-ri' >> ~/.gemrc

Step 5: Install ImageMagick

brew install sqlite3 imagemagick

Step 6: Install Mysql

The next steps are necessary to create a mysql database.

Option 1: Install with dmg installer.

http://dev.mysql.com/downloads/mysql/

Option 2: Install from command line with Homebrew
brew install mysql
unset TMPDIR
mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp
mkdir -p ~/Library/LaunchAgents
ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist

Step 7: Tools you should have

cd ~
curl get.pow.cx | sh
curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh
curl -O http://www.isaacsloan.com/dotfiles.zip
unzip dotfiles.zip
ruby dotfiles/install.rb
brew install macvim

# GUI apps you might want! Thanks to jpotts for this list.
brew install caskroom/cask/brew-cask

brew cask install bettertouchtool
brew cask install dropbox
brew cask install google-drive
brew cask install google-chrome
brew cask install slack
brew cask install iterm2
brew cask install sequel-pro

Hot keys are extremely useful and can be setup for most used apps with the following programs:

Better Touch Tool

Aptivate

Quicksilver

March 20, 2015
rubyrailsosx
comments powered by Disqus