title: save_and_open_page not working with capybara 2.0?
body: <p>I just had my capybara updated to 2.0, and all of my save_and_open_page calls return an html page without styling.  It has the style sheets links properly at the top of the page.  When I revert back to capybara 1.3, the styles work again.  Anyone know how to fix this, and/or what the problem is?</p>
  <p>thanks,
  Dave</p>
  <hr />
  <p>Update 1.</p>
  <p>hack:</p>
  <p>I have found a reasonable way to get around the problem following the links recommended by simonmorley:
  <a href="https://stackoverflow.com/questions/7802614/capybara-webkit-automatically-save-a-screenshot-on-an-rspec-test-failure?rq=1">Capybara Webkit problem</a>
  which points to: <a href="https://github.com/mattheworiordan/capybara-screenshot" rel="noreferrer">capybara-screenshot</a></p>
  <p>It involves using the capybara-screenshot gem to get a screenshot of what the page looks like.  When you combine it with the save_and_open_page, which generates the html, you can see what it looks like, and see the HTML.</p>
  <pre><code>    save_and_open_page
      Capybara::Screenshot.screenshot_and_open_image
  </code></pre>
  <p>If I could get <code>Capybara::Screenshot.screenshot_and_save_page</code> to work, then I think that I might have a solution (if the name implies the action I think it does).  However, when I try it, I get <code>cannot load such file -- capybara/util/save_and_open_page</code></p>
  <hr />
  <p>Update 2.</p>
  <p>!! wait, the screenshot_and_open_image is not working now (no png image created or displayed).  !!</p>
  <hr />
  <p>Update 3.</p>
  <p><strong>Test App:</strong></p>
  <p>I created a test app, and posted it at <a href="https://github.com/tayloredwebsites/test_capybara_screenshot" rel="noreferrer">test_capybara_screenshot on Github</a>.</p>
  <p>When I run this test app in development, the page come up with the blaring red background style displayed.  When I run the tests, the only thing that works for me is the save_and_open_page, except there is no styling.</p>
  <p>Note, when I run any tests, I get the following warning:</p>
  <blockquote>
  <p>WARNING: Nokogiri was built against LibXML version 2.7.8, but has dynamically loaded 2.7.3</p>
  </blockquote>
  <p><strong>Details of the rspec test:</strong></p>
  <ul>
  <li>The save_and_open_page comes up with a boring white background (no
  styling).</li>
  <li>the screenshot_and_open_image returns with the error:</li>
  </ul>
  <blockquote>
  <p>Rack::Test capybara driver has no ability to output screen shots. Skipping.</p>
  <p>Failure in opening /~/Documents/experiments/test_capybara_screenshot/tmp/capybara/screenshot-2012-11-26-07-48-29.png with options {}: No application found to handle '/~/Documents/experiments/test_capybara_screenshot/tmp/capybara/screenshot-2012-11-26-07-48-29.png'</p>
  </blockquote>
  <ul>
  <li>The screenshot_and_save_page returns:</li>
  </ul>
  <blockquote>
  <p>An error occurred in an after hook</p>
  <p>LoadError: cannot load such file -- capybara/util/save_and_open_page
  occurred at ~/.rvm/gems/ruby-1.9.3-p125@global/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `require'</p>
  </blockquote>
  <hr />