- Install GCC Compiler or XCode
Options (choose one)
- Install Xcode from App Store. After the installation, open up Xcode in your /Applications folder. You’d want to go to Xcode -> Preferences -> Downloads tab then install the “Command Line Tools.”
- Install command line tools: https://developer.apple.com/downloads/download.action?path=Developer_Tools/command_line_tools_os_x_mavericks_for_xcode__march_2014/commandline_tools_os_x_mavericks_for_xcode__march_2014.dmg
- Install Homebrew (package manager)
In shell:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- Install Git with Homebrew
In shell:
brew install git
- Install databases and server (these might conflict with existing installations so be aware)
brew install mongodb
brew install mysql
brew install nginx
- Install a ruby version manager (rbenv)
brew install rbenv ruby-build
- Add rbenv path to your bash profile. If you use ZSH, replace .bash_profile with .zshrc
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
exec $SHELL
- Install newest version of Ruby
rbenv install <latest-version>
rbenv rehash
- Set the newest version to system default
rbenv global <latest-version>
- Install a ruby gem-manager
gem install bundler
- Update Rubygems
gem update --system"
- Install Rails
gem install rails
- Install all Gems for an application
Go into application folder and:
bundle install
- Run local server
Go into application folder and:
rails server
Visit: localhost:3000