Sunday, November 4, 2012

Set Up RoR development environment for Mac OS X 10.8.2

1. Set up Git
Although it's named as Snow Leopard, it works with Mountain Lion.

1b. Set up Git merge tool:
+ Install p4merge
+ Create a new text file in /usr/local/bin called p4merge, make it executable, and add following lines:
/Applications/ $*

+ Create a new text file in /usr/local/bin call p4diff, make it executable and add following lines:
[ $# -eq 7 ] && /usr/local/bin/p4merge "$2" "$5"

+ Open your git configuration file (probably ~/.gitconig) and add these lines:
 keepBackup = false;
 tool = p4merge
[mergetool "p4merge"]
 cmd = p4merge "$BASE" "$LOCAL" "$REMOTE" "$MERGED"
 keepTemporaries = false
 trustExitCode = false
 keepBackup = false
 external = p4diff

 2. Install Command Line Tools for Xcode (OS X Mountain Lion) if you don't want to install the whole Xcode

3. Install rvm and ruby 1.9.3
curl -L | bash -s stable
source /Users/phucquang/.rvm/scripts/rvm
rvm install 1.9.3
rvm use 1.9.3
rvm --default 1.9.3

4. Enabling Apache - Using 3rd party Preference Panel
OR 3rd party application (recommended)

4b. Starting built-in Apache server automatically.
sudo launchctl load -w /System/Library/LaunchDaemons/org.apache.httpd.plist

5. Install MySQL
Go to, and download Mac OS X ver. 10.6 (x86, 64-bit), DMG Archive

6. Install homebrew
ruby < (curl -fsSk

7. Install ImageMagick
brew install imagemagick --use-tiff 

No comments: