Masatoshi Nishiguchi

Setting up Rails development environment (OS X)

I have worked on Rails apps more than a few times in the past but every time I set it up, I need some researches to refresh my memory. I decided to put together all my resources here so that I will not need to go anywhere else for this topic.

1. Preparing basic tools

2. Install a Ruby version management tool

Install RVM

# Install RVM
$ \curl -sSL https://get.rvm.io | bash

# Reload this shell and initialize rvm.
$ exec bash -l

# Update rvm
$ rvm get master

# Install ruby
$ rvm install 2.3.1
# NOTE: If you get the warning below, you can safely ignore it and move on to step 3.
# * WARNING: You have '~/.profile' file, you might want to load it,
#   to do that add the following line to '/Users/adamzerner/.bash_profile':

# Configure your default version of ruby
$ rvm use 2.3.1 --default

If you ever get stuck with RVM

$ rvm help
$ rvm gemset help

3. Install RubyGems

4. Install Rails

# Install Rails with a specific version number.
$ gem install rails -v 4.2.2

Reference