Steps to Build Ruby on Rails Development Environment on Mac [Ruby 1.8.7]

Tadashi Shigeoka ·  Sun, September 11, 2011

I’ll introduce the steps to build a Ruby on Rails development environment on macOS with Ruby 1.8.7.

Ruby on Rails

Ruby Installation

Mac comes with Ruby pre-installed by default, so let's just check the version.
$ ruby -v
ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0]

According to the official site, Ruby 1.8.7 and Ruby 1.9.2 are recommended, so it seems we don’t need to update.

Ruby on Rails Installation

Ruby on Rails: Download

Mac comes with RubyGems by default.

Update RubyGems Itself

sudo gem update --system

Install Rails with gem

sudo gem install rails --include-dependencies

SQLite3 Installation

Rails' DB environment defaults to SQLite3, so we'll install this too.
brew install sqlite

Also, install the sqlite driver so Rails can access SQLite.

gem install sqlite3

That’s all from the Gemba.