Skip to content

Instantly share code, notes, and snippets.

@amit352
Forked from mikedijkstra/new_mac.md
Created February 17, 2019 02:30
Show Gist options
  • Save amit352/fe33a0eeb03c8f64645ab446cb60e074 to your computer and use it in GitHub Desktop.
Save amit352/fe33a0eeb03c8f64645ab446cb60e074 to your computer and use it in GitHub Desktop.
How to setup a new mac for Ruby on Rails development with MongoDB, Imagemagick and POW
Makre sure your home directory does not have a space in it or gcc will crap itself
1. Download and install Xcode
2. Install Command Line Tools (Xcode > Preference > Downloads)
3. Install Homebrew[http://mxcl.github.com/homebrew/]
4. Install Git
$ brew install git
$ cd
$ git clone git://github.com/sstephenson/rbenv.git .rbenv
$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_login
$ echo 'eval "$(rbenv init -)"' >> ~/.bash_login
5. Install ruby-build
$ mkdir -p ~/.rbenv/plugins
$ cd ~/.rbenv/plugins
$ git clone git://github.com/sstephenson/ruby-build.git
6. Install Ruby 1.9.3
$ rbenv install 1.9.3-p392
7. Set 1.9.3 as global
$ rbenv global 1.9.3-p392
$ rbenv shell 1.9.3-p392
8. Update to latest rubygems version
$ gem update --system
9. Install rdoc
$ sudo gem install rdoc
10. Install rails
$ sudo gem install rails
11. Install bundler
$ sudo gem install bundler
12. Install postgres
$ sudo gem install pg
13. Install Heroku toolbelt
$ brew install heroku-toolbelt
14. Install Quartz[http://xquartz.macosforge.org/downloads/SL/XQuartz-2.7.4.dmg]
15. Install MongoDB
$ brew install mongodb
$ mkdir -p ~/Library/LaunchAgents
$ cp /usr/local/Cellar/mongodb/2.2.2-x86_64/homebrew.mxcl.mongodb.plist ~/Library/LaunchAgents/
$ launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist
16. Install imagemagick
$ brew install imagemagick
17. Install POW
$ curl get.pow.cx | sh
$ cd ~/.pow
$ ln -s ~/Sites/storyberg
If POW loads the wrong ruby version you might have to add the following to ~/.powconfig
export PATH="/usr/local/Cellar/rbenv/0.3.0/bin:/Users/micdijkstra/.rbenv/shims:/Users/micdijkstra/.rbenv/bin:$PATH"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment