- Install the command line tools for your OS X =================================================
This package enables UNIX-style development via Terminal by installing command line developer tools, as well as Mac OS X SDK frameworks and headers. Many useful tools are included, such as the Apple LLVM compiler, linker, and Make.
- Install Git =================================================
Git is a distributed revision control and source code management (SCM) system with an emphasis on speed
- Install Homebrew =================================================
The missing package manager for OS X
Run this command on your terminal:
ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)"
- Install RVM and the latest Ruby version =================================================
RVM is a command-line tool which allows you to easily install, manage, and work with multiple ruby environments from interpreters to sets of gems.
Run this command on your terminal:
curl -L https://get.rvm.io | bash -s stable --ruby
- Make Ruby 1.9.3 default =================================================
rvm default 1.9.3
- Install MySQL =================================================
brew install mysql
To have launchd start mysql at login:
ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents
Then to load mysql now:
launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
Or, if you don't want/need launchctl, you can just run:
mysql.server start
- Install Bundler and Rails =================================================
[sudo] gem install bundler
[sudo] gem install rails
And now your ready to start your project using rails and mysql.
rails new my_project -d mysql && cd my_project && rails s
open http://0.0.0.0:3000
If everything it's working as it should your rails server should be up and running on this URL: http://0.0.0.0:3000
Easy right?