I’m using Rails 3.0.7 and ruby 1.9.2 with cucumbe开发者_StackOverflowr and capybara. I just had this problem, and I can’t find a solution :(
invalid byte sequence in US-ASCII (ArgumentError) :10:in
synchronize' (eval):2:in
click_button' ./features/step_definitions/vouchers_company_steps.rb:25:in `/^I use it in my voucher UI$/'
I think it has something to do with the form submission which is a GET and the famous utf8 tick. I don’t have this problem with my other forms. This one is using metasearch, I don’t know if it can help.
add to the top of the file
# encoding: utf-8
encoding: utf-8 didn’t help.
I narrowed down the problem and found it occurs only within cucumber/capybara when submitting a form with a GET request. The error appears with the utf8=✓ parameter…
EDIT: Found the culprit: I’m using escape_utils and removing it make capybara work again.
精彩评论