Listing 3.1: A Gemfile for the sample app.

This includes rspec-rails in a development environment so that we have
access to RSpec-specific generators, and it includes it in test mode in
order to run the tests. We don’t have to install RSpec itself because it
is a dependency of rspec-rails and will thus be installed automatically.
We also include the Capybara gem, which allows us to simulate a user’s
interaction with the sample application using a natural English-like
syntax, together with Selenium, one of Capybara’s dependencies.1 As in
Chapter 2, we also must include the PostgreSQL and static assets gems in
production for deployment to Heroku:

group :production do
  gem 'pg', '0.15.1'
  gem 'rails_12factor', '0.0.2'
end

Heroku recommends against using different databases in development and
production, but for the sample application it won’t make any difference,
and SQLite is much easier than PostgreSQL to install and configure.