Skip to content

Instantly share code, notes, and snippets.

@strukturedkaos
Created May 26, 2015 16:22
Show Gist options
  • Save strukturedkaos/10ff4fae7795538d4c0c to your computer and use it in GitHub Desktop.
Save strukturedkaos/10ff4fae7795538d4c0c to your computer and use it in GitHub Desktop.

chruby can be installed in various ways. For OSX, it is as simple as:

brew install chruby

Next, add the two following lines to your shell profile file (.bashrc, .zshrc, etc.)

source '/usr/local/share/chruby/chruby.sh'
source '/usr/local/share/chruby/auto.sh'

In addition to that, I use Bundler to manage dependencies - which makes gemsets obsolete - and ruby-build to install Ruby versions; I keep them under ~/.rubies:

brew install ruby-build
mkdir ~/.rubies
ruby-build 2.2.2 ~/.rubies/ruby-2.2.2

To set default Ruby, put the following line inside your shell profile file (e.g. .bashrc, .zshrc, etc):

chruby ruby-2.2.2

Install bundler:

gem install bundler

Navigate to the Rails project and install all the gems:

bundle install

You may also need to install Postgres. I use Postgres.app: http://postgresapp.com/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment