title: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true
body: <p>I'm reading through Rails 4 in Action.  I'm getting the aforementioned error while testing with Rspec and Capybara.  My viewing_projects_spec.rb looks like this:</p>
  
  <pre><code>require 'spec_helper'
  
  feature "Viewing projects" do
    scenario "Listing all projectcs" do
      project = FactoryGirl.create(:project, name: "TextMate 2")
      visit '/'
      click_link 'TextMate 2'
      expect(page.current_url).to eql(project_url(project))
    end
  end
  </code></pre>
  
  <p>The rest of the error says <code>Failure/Error: expect(page.current_url).to eql(project_url(project))</code>.</p>
  
  <p>I did some googling and people say to place the following inside config/environments/development.rb:</p>
  
  <pre><code>Rails.application.routes.default_url_options[:host] = 'localhost:3000'
  </code></pre>
  
  <p>Unfortunately this doesn't do anything.</p>