开发者

UTF-8 error with Cucumber feature

开发者 https://www.devze.com 2023-04-06 14:40 出处:网络
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 :(

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:inclick_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.

0

精彩评论

暂无评论...
验证码 换一张
取 消