Capybara: [WIP] Rails 5: Rack 2 breaks capybara's click_button method

Created on 29 Oct 2015  路  8Comments  路  Source: teamcapybara/capybara

Appears that rack 2 (for Rails 5) has broken capybara's click_button method.
Now getting "undefined method `normalize_params' for Rack::Utils:Module"
error when we using capybara's click_button method.

  • After porting to Rails 5, I get this error with at least 3 repos:
   Failure/Error: click_button "Create Task"
     NoMethodError:
       undefined method `normalize_params' for Rack::Utils:Module

To Reproduce, you can do the following:

        Failure/Error: click_button "Create Task"
        NoMethodError:
          undefined method `normalize_params' for Rack::Utils:Module
  • After tracking down the trigger line, I found this line

    • Rack::Utils.normalize_params(params, key, value)

    in this method:

    • merge_param!(params, key, value)

    in this file:

    • capybara-2.5.0/lib/capybara/rack_test/form.rb

Also found these references interesting:

Most helpful comment

I've faced this same issue and upgrading to a newer version fixed it for me. In my case, I've used:

gem 'capybara', '~> 2.8'

All 8 comments

This should already be fixed in the master branch, please try using that

You are right - Sorry for the issue.

When is the next release of capybara gem?

No current date set - use the master branch

OK

I've faced this same issue and upgrading to a newer version fixed it for me. In my case, I've used:

gem 'capybara', '~> 2.8'

I just upgraded from Rails 4.2.7 to 5.0.0, and had to set capybara-webkit 1.8.0, and then bundle update capybara, which set capybara to 2.6.2 and solved the problem for me.

@chemturion Capybara 2.6.2 is obsolete (released Jan 2016) as is capybara-webkit 1.8 (Jan 2016) - You want to be running newer than that.

Was this page helpful?
0 / 5 - 0 ratings