Capybara visit does not load the page
<p>I can't seem to get pages loaded under capybara. The application is namespaced under <code>localhost:3000/secure</code>, but I think that all the settings for there are in place.  I see capybara hitting the server log, it seems like it loads the page normally and returns with status 200. However when i try to look at the page the output is always the same, empty html page.</p>

<p>It used to show me the server errors (500 and 404). But once i fixed those in the controller, nothing happens</p>

<p>rspec:</p>

<pre><code>it 'should update the record normally for married status' do
  visit edit_members_bene_partner_path
  save_and_open_page
end
</code></pre>

<p>Output of the html is:</p>

<pre><code>&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;&lt;/body&gt;&lt;/html&gt;
</code></pre>

<p>rspec helper:</p>

<pre><code># This file is copied to spec/ when you run 'rails generate rspec:install'
ENV['RAILS_ENV'] ||= 'test'
require File.expand_path('../../config/environment', __FILE__)
require 'rspec/rails'
require 'capybara/rspec'
require 'capybara/rails'
require 'capybara/poltergeist'
require 'capybara-screenshot/rspec'
require 'factory_girl_rails'

# settings for capybara
Capybara.configure do |config|
  config.javascript_driver = :poltergeist
  config.default_wait_time = 5
  config.app_host = 'localhost:3000/secure'
  config.run_server = true
end

RSpec.configure do |config|
  config.include Capybara::DSL
  config.include FactoryGirl::Syntax::Methods
  config.include Rails.application.routes.url_helpers
end
</code></pre>