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.
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
in this method:
in this file:
Also found these references interesting:
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.
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: