Infrastructure

First off, we’ll need a Rails application. We’ll be using Rails 4.1.7 and Ruby 2.1.4; use of Ruby 2.0–specific features will be minimal.

We’ll start by generating the Rails application from the command line:

​ 
% rails new gatherer

This will create the initial directory structure and code for a Rails application. It will also run bundle install to load initial gems. I assume that you are already familiar with Rails core concepts, I won’t spend a lot of time re-explaining them. If you are not familiar with Rails, Agile Web Development with Rails [RTH13] is still the gold standard for getting started.

We need to create our databases. For ease of setup and distribution we’ll stick to the Rails default, which is SQLite. ...

Get Rails 4 Test Prescriptions now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.