title: Stack Level Too Deep Exception using Capybara and Selenium Grid
body: <p>I am working to convert some Selenium tests to use Selenium grid and am running into a problem.</p>
  <p>The tests run fine using a browser on the local machine.</p>
  <p>I created a new driver like this (in spec_helper.rb):</p>
  <pre><code>Capybara.register_driver :selenium_remote do |app|
    caps = Selenium::WebDriver::Remote::Capabilities.chrome
    Selenium::WebDriver.for(:remote, 
      :url =&gt; 'http://gridhub:4444/grid/driver', 
      :desired_capabilities =&gt; caps)
  end
  </code></pre>
  <p>When I run the tests with the new driver the hub is contacted and a node loads the Chrome driver, everything looks ok on the grid side.</p>
  <p>The problem is that on the machine initiating the tests I am getting the following exception:</p>
  <pre><code>Failure/Error: Unable to find matching line from backtrace
       SystemStackError:
         stack level too deep
  # /home/.rvm/gems/ruby-1.9.3-p194/gems/capybara-2.0.1/lib/capybara.rb:298
  </code></pre>
  <p>I created this bare bones test, and I am still seeing the same exception just running it:</p>
  <pre><code>Capybara.default_driver = :selenium_remote
  
  describe 'I can' do
    it 'visit Google without throwing an error' do        
      visit 'http://www.google.com'
    end
  end
  </code></pre>
  <p>I am using Selenium server standalone 2.26.0, Capybara 2.0.1 and RSpec 2.9.0.</p>
  <p>Any ideas what is causing this?</p>