This project is archived and is in readonly mode.

#4714 ✓stale

Rails 2.3.8: breaks Selenium test

Reported by TMorgan99 | May 27th, 2010 @ 05:25 PM

Not sure where in the stack this is happening.

I am running the example from the RSpec book, 'automated_browser/01'

I runs with Rails 2.3.5, but it times out in 2.3.8.

The only change I made was the RAILS_GEM_VERSION declaration

Comments and changes to this ticket

  • Jeff Kreeftmeijer

    Jeff Kreeftmeijer May 27th, 2010 @ 05:28 PM

    Could you show us the code and explain how to reproduce it?

  • TMorgan99

    TMorgan99 May 27th, 2010 @ 06:26 PM

    Not much to add, really.
    The app is available from pragprog,
    unzip the folder 'automated_browser/01'

    Then, I have added a Gemfile to specify my gems ...

    # A sample Gemfile
    # Not *used* by Rails 2.3, but used by 'bundle install' to prep the gems manually
    source :gemcutter
    gem "rails", '2.3.5'
    gem "sqlite3-ruby", :require => 'sqlite3'
    gem 'rake'
    gem 'rspec'
    gem 'rspec-rails'
    gem 'cucumber'
    gem 'cucumber-rails'
    gem 'database_cleaner'
    gem 'nokogiri'
    gem 'webrat'
    gem 'mongrel'
    gem 'selenium-client'
    $ bundle install
    $ rake db:migrate db:test:prepare  cucumber

    Test runs ok.

    Now change gemfile to rails '2.3.8'
    Change RAILS_GEM_VERSION in ./config/environment.rb

    $ bundle install
    $ rake cucumber

    Test fails on timeout

  • TMorgan99

    TMorgan99 May 31st, 2010 @ 11:30 PM

    I have traced this a bit further.
    I used a cucumber enabled git bisect search to find the point of failure.

    It appears that the problem is the upgrading to rack 1.1.0
    If I reverse this patch

    patch -p1 -R <  0001-rack-dependency-bumped-to-110-tests-passing.patch
    my test runs again.
    But I am not sure why.

    What were the tests that were passing here, so I could add my failing test to them?

  • TMorgan99

    TMorgan99 June 1st, 2010 @ 12:59 AM

    • State changed from “new” to “resolved”
    • Assigned user set to “josh”

    git bisect search finds this commit in rails...

    74206aeff2b6a960612a820ec47e91ef9b778262 is first bad commit
    commit 74206aeff2b6a960612a820ec47e91ef9b778262
    Author: Rizwan Reza <>
    Date:   Sun May 16 23:40:17 2010 +0430
        Rack dependency bumped to 1.1.0, tests passing. [#3558 state:resolved]
        Signed-off-by: José Valim <>

    further git bisect searching within rack leads to this ...

    commit 8f836f406ca10274c6465e17c2b5646257a8412b
    Author: Eric Wong <>
    Date:   Thu Dec 10 21:34:17 2009 -0600

    avoid HeaderHash#to_hash in middlewares
    Since HeaderHash objects are valid header responses, avoid
    converting the headers to Hash objects only to have it
    reconverted back to HeaderHash in the next middleware.
    Signed-off-by: Joshua Peek &lt;;

    I have opened a ticket on Rack

    I suppose the tests in rack were insufficient?

  • TMorgan99

    TMorgan99 June 1st, 2010 @ 11:00 PM

    oops - it seemed that I have inadvertently resolved this issue.
    If I reverse the commit in rack, I can run my test successfully.

    It appear that subsequent middlewares were not advised as to this change, and will fail if they were relying on
    the .to_hash call

  • Jeremy Kemper

    Jeremy Kemper June 22nd, 2010 @ 08:14 PM

    • State changed from “resolved” to “open”
  • Santiago Pastorino

    Santiago Pastorino February 2nd, 2011 @ 05:01 PM

    • Importance changed from “” to “Low”

    This issue has been automatically marked as stale because it has not been commented on for at least three months.

    The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.

    Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.

  • Santiago Pastorino

    Santiago Pastorino February 2nd, 2011 @ 05:02 PM

    • State changed from “open” to “stale”
  • bingbing

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>

People watching this ticket

Referenced by