title: Capybara::ElementNotFound: Unable to find xpath "/html"
body: <p>I'm following the Ruby on Rails tutorial at <a href="http://ruby.railstutorial.org/chapters/static-pages" rel="noreferrer">http://ruby.railstutorial.org/chapters/static-pages</a> and came across the following error</p>
  
  <pre><code> StaticPages Home page should have the content 'Sample App'
   Failure/Error: page.should have_content('Sample App')
   Capybara::ElementNotFound:
     Unable to find xpath "/html"
   # (eval):2:in `text'
   # ./spec/requests/static_pages_spec.rb:7:in `(root)'
  </code></pre>
  
  <p>My Gem file is as follows</p>
  
  <pre><code>source 'http://rubygems.org'
  
  gem 'rails', '3.0.10'
  
  gem 'jruby-openssl'
  
  gem 'activerecord-jdbcsqlite3-adapter'
  group :development, :test do
     gem 'webrat'
     gem 'rspec-rails', "&gt;= 2.10.0"
     gem 'capybara', "&gt;= 1.1.2"
  end
  </code></pre>
  
  <p>How do I get rid of this error and pass the rspec?
  The source file</p>
  
  <pre><code>require 'spec_helper'
  
  describe "StaticPages" do
  
    describe "Home page" do
  
      it "should have the content 'Sample App'" do
        visit '/static_pages/home'
        # puts page.html
        page.should have_content('Sample App')
      end
    end
  end
  </code></pre>