Monday, May 02, 2011

Brew/RVM/PSQL/Bundler Installation for a MacBook Pro

Install XCode - if you do this from disc, you'll need to upgrade later (version 3.2 that comes on snow leopard disc has bugs). You can download and start with the new one. It's 3.2 GB and could take a while to download. Do this first.

Install Brew. Follow the instructions here ( I used the ruby script. If you have permission errors, you may need to do the following:

sudo chown -R $USER /usr/local

If you're OK, then install git

brew install git

If you have errors at this point, it may be due to XCode not being installed properly.

brew install postgresql

If you have an older system you may run into conflicts. Try 'brew doctor'

Follow all the instructions that show up after the postgres build. This will force the db to start up right away and set the psql function so you can access the db from command line.

# install rvm

bash < <( curl ) # The first time you install RVM, you must put the following line into your ~/.bash_profile at the very end, after all path loads etc: [[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # This loads RVM into a shell session. # Add ruby rvm install 1.9.2 rvm install 1.8.7 rvm install ree For each project, create a .rvmrc file - this goes in the root of the rails app directory. More Show hidden files on your mac defaults write AppleShowAllFiles YES restart launcher

RVM configuration

.rvmrc files - add ruby version and gemset per project

gem install bundler - bundler should be a gem that you can access from any rvm configuration - used to generate Gemfile and Gemfile.lock.

* rvm instructions for 10.10