Setting up a new Mac for Rails Development
January 04, 2011
I just got a new MacBook (whoo hoo!) because my old machine dies (boo hoo) and thought I'd write down the steps I'm taking to set it up. I imagine this is more for myself than anyone else but keep reading if you like.
- Some Apps
- Google Chrome for browsing
- TextMate for editing
- Adium for IM
- Homebrew for package management
- Open a terminal and type
ruby -e "$(curl -fsSL https://gist.github.com/raw/323731/install_homebrew.rb)
- Download and Install XCode from Apple
- Open a terminal and type
- git & github for development
- Install GIT
brew install git
- create ssh keys and add to github following these instructions
- Configure git
git config --global user.name "Alex Rothenberg"
git config --global user.email "alex@alexrothenberg.com"
git config --global color.ui true
- Install GIT
- RVM
- Install rvm
- add bundler to ~/.rvm/gemsets/global.gems and install it
echo bundler >> ~/.rvm/gemsets/global.gems
gem install bundler
- install Ruby 1.8.7 and make it default
rvm install 1.8.7
rvm --default 1.8.7
- Databases
- MySQL
brew install mysql
- Oracle (this is complicated but works if you follow the directions exactly TO THE LETTER without missing a single step!) http://blog.rayapps.com/2009/09/14/how-to-install-oracle-database-10g-on-mac-os-x-snow-leopard/. Then I did have to run these extra commands
- Add oracle env settings to my user
#.bashrc
## ORACLE
export ORACLE_HOME=/Users/oracle/oracle/product/10.2.0/db_1
export DYLD_LIBRARY_PATH=$ORACLE_HOME/lib
export ORACLE_SID=orcl
PATH=$PATH:$ORACLE_HOME/bin
- Enable me to access the oracle files
sudo dscl localhost -append /Local/Default/Groups/oinstall GroupMembership alex
- SQL Developer is an Oracle GUI
- Add oracle env settings to my user
- MySQL
- Test with a project
git clone git://github.com/alexrothenberg/legacy_data.git cd legacy_data export MYSQL export ORACLE bundle install rake
- Finally I'm following the trend and setting up a dotfiles project on github so I don't have to recreate them in the future.