Skip to content

Instantly share code, notes, and snippets.

@benr75
Last active December 19, 2019 04:49
Show Gist options
  • Save benr75/6f0faaaa7582ff6508ac8d9f9a89a9a9 to your computer and use it in GitHub Desktop.
Save benr75/6f0faaaa7582ff6508ac8d9f9a89a9a9 to your computer and use it in GitHub Desktop.
Instructions for getting a Rails Environment setup on macOS

Instructions to setup a Rails Environment on macOS

Supporting Software

Install Xcode. Be sure to open it once an install the additional components.

Install Homebrew.

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

If the project is going to use the pg gem install Postgresql.

brew install postgresql

Install Ruby Version Manager. Be sure to follow the instructions the installer provides to insure that rvm is in your PATH.

\curl -sSL https://get.rvm.io | bash -s stable

Setup Ruby, a Gemset, and get Rails ready

Install the Ruby version desired, in this example 2.6.

rvm install 2.6

Create a gemset to use for your Rails project.

rvm gemset create my_awesome_project

Use the newly created gemset.

rvm gemset use my_awesome_project

Change into the root of your Rails project and install the bundle.

bundle install

Run migrations.

rails db:migrate

or for older Rails apps use rake.

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