Encoding issue? #71

Closed
binghai opened this Issue Sep 12, 2011 · 5 comments

Comments

Projects
None yet
5 participants
@binghai

binghai commented Sep 12, 2011

When I run rspec spec, after finishing all the tests, simplecov raised this error.

/xxx/.rvm/gems/ruby-1.9.2-p290/gems/simplecov-0.5.0/lib/simplecov/source_file.rb:140:in block in process_skipped_lines': invalid byte sequence in UTF-8 (ArgumentError) from /xxx/.rvm/gems/ruby-1.9.2-p290/gems/simplecov-0.5.0/lib/simplecov/source_file.rb:139:ineach'
from /xxx/.rvm/gems/ruby-1.9.2-p290/gems/simplecov-0.5.0/lib/simplecov/source_file.rb:139:in each_with_index' from /xxx/.rvm/gems/ruby-1.9.2-p290/gems/simplecov-0.5.0/lib/simplecov/source_file.rb:139:inprocess_skipped_lines'
from /xxx/.rvm/gems/ruby-1.9.2-p290/gems/simplecov-0.5.0/lib/simplecov/source_file.rb:64:in initialize' from /xxx/.rvm/gems/ruby-1.9.2-p290/gems/simplecov-0.5.0/lib/simplecov/result.rb:24:innew'
from /xxx/.rvm/gems/ruby-1.9.2-p290/gems/simplecov-0.5.0/lib/simplecov/result.rb:24:in block in initialize' from /xxx/.rvm/gems/ruby-1.9.2-p290/gems/simplecov-0.5.0/lib/simplecov/result.rb:23:ineach'
from /xxx/.rvm/gems/ruby-1.9.2-p290/gems/simplecov-0.5.0/lib/simplecov/result.rb:23:in map' from /xxx/.rvm/gems/ruby-1.9.2-p290/gems/simplecov-0.5.0/lib/simplecov/result.rb:23:ininitialize'
from /xxx/.rvm/gems/ruby-1.9.2-p290/gems/simplecov-0.5.0/lib/simplecov.rb:46:in new' from /xxx/.rvm/gems/ruby-1.9.2-p290/gems/simplecov-0.5.0/lib/simplecov.rb:46:inresult'
from /xxx/.rvm/gems/ruby-1.9.2-p290/gems/simplecov-0.5.0/lib/simplecov/configuration.rb:120:in block in at_exit' from /xxx/.rvm/gems/ruby-1.9.2-p290/gems/simplecov-0.5.0/lib/simplecov/defaults.rb:42:incall'
from /xxx/.rvm/gems/ruby-1.9.2-p290/gems/simplecov-0.5.0/lib/simplecov/defaults.rb:42:in `block in <top (required)>'

There is Chinese characters within my rails app, is that the problem?

My environment is ruby 1.9.2, rails 3.1.0

Thanks a lot!

-binghai

@colszowka

This comment has been minimized.

Show comment
Hide comment
@colszowka

colszowka Sep 12, 2011

Owner

Hi, yes. I recently bumped into this as well on the new version while generating coverage for the devise gem. Obviously the newly introduced :nocov: functionality (and the regexp matching it uses) fails for Unicode characters. This is a big problem and I'll resolve it as soon as possible.

Owner

colszowka commented Sep 12, 2011

Hi, yes. I recently bumped into this as well on the new version while generating coverage for the devise gem. Obviously the newly introduced :nocov: functionality (and the regexp matching it uses) fails for Unicode characters. This is a big problem and I'll resolve it as soon as possible.

@macmartine

This comment has been minimized.

Show comment
Hide comment
@macmartine

macmartine Sep 12, 2011

I'm hitting this as well and don't have any double-byte characters that I'm aware of.

I'm hitting this as well and don't have any double-byte characters that I'm aware of.

@steamedbuninvasion

This comment has been minimized.

Show comment
Hide comment
@steamedbuninvasion

steamedbuninvasion Sep 13, 2011

I think I was able to pinpoint this one. For me it was the tar_input.rb of rubygems. The name Mauricio Julio Fernández .. was creating the error for me. On my system it was located here:
/Users/clint/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/package/tar_input.rb

I think I was able to pinpoint this one. For me it was the tar_input.rb of rubygems. The name Mauricio Julio Fernández .. was creating the error for me. On my system it was located here:
/Users/clint/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/package/tar_input.rb

@colszowka

This comment has been minimized.

Show comment
Hide comment
@colszowka

colszowka Sep 13, 2011

Owner

Alright, SimpleCov 0.5.3 is out. Please update as soon as possible - and it would be great if those who encountered this issue could report back whether things are resolved for them. Thanks!

Owner

colszowka commented Sep 13, 2011

Alright, SimpleCov 0.5.3 is out. Please update as soon as possible - and it would be great if those who encountered this issue could report back whether things are resolved for them. Thanks!

@dinatih

This comment has been minimized.

Show comment
Hide comment
@dinatih

dinatih Dec 6, 2011

Hello,

I've got the same issues with the simplecov 0.5.4

Users/davidherelle/.rvm/gems/ruby-1.9.2-p180@jobteaser.com/ruby/1.9.1/gems/simplecov-0.5.4/lib/simplecov/source_file.rb:157:in block in process_skipped_lines!': invalid byte sequence in UTF-8 (ArgumentError) from /Users/davidherelle/.rvm/gems/ruby-1.9.2-p180@jobteaser.com/ruby/1.9.1/gems/simplecov-0.5.4/lib/simplecov/source_file.rb:156:ineach'
from /Users/davidherelle/.rvm/gems/ruby-1.9.2-p180@jobteaser.com/ruby/1.9.1/gems/simplecov-0.5.4/lib/simplecov/source_file.rb:156:in process_skipped_lines!' from /Users/davidherelle/.rvm/gems/ruby-1.9.2-p180@jobteaser.com/ruby/1.9.1/gems/simplecov-0.5.4/lib/simplecov/source_file.rb:98:inlines'
from /Users/davidherelle/.rvm/gems/ruby-1.9.2-p180@jobteaser.com/ruby/1.9.1/gems/simplecov-0.5.4/lib/simplecov/source_file.rb:127:in covered_lines' from /Users/davidherelle/.rvm/gems/ruby-1.9.2-p180@jobteaser.com/ruby/1.9.1/gems/simplecov-0.5.4/lib/simplecov/file_list.rb:7:inblock in covered_lines'
from /Users/davidherelle/.rvm/gems/ruby-1.9.2-p180@jobteaser.com/ruby/1.9.1/gems/simplecov-0.5.4/lib/simplecov/file_list.rb:7:in map' from /Users/davidherelle/.rvm/gems/ruby-1.9.2-p180@jobteaser.com/ruby/1.9.1/gems/simplecov-0.5.4/lib/simplecov/file_list.rb:7:incovered_lines'
from /Users/davidherelle/.rvm/gems/ruby-1.9.2-p180@jobteaser.com/ruby/1.9.1/gems/simplecov-0.5.4/lib/simplecov/file_list.rb:30:in lines_of_code' from /Users/davidherelle/.rvm/gems/ruby-1.9.2-p180@jobteaser.com/ruby/1.9.1/gems/simplecov-0.5.4/lib/simplecov/file_list.rb:35:incovered_percent'
from (erb):17:in `block in format'

dinatih commented Dec 6, 2011

Hello,

I've got the same issues with the simplecov 0.5.4

Users/davidherelle/.rvm/gems/ruby-1.9.2-p180@jobteaser.com/ruby/1.9.1/gems/simplecov-0.5.4/lib/simplecov/source_file.rb:157:in block in process_skipped_lines!': invalid byte sequence in UTF-8 (ArgumentError) from /Users/davidherelle/.rvm/gems/ruby-1.9.2-p180@jobteaser.com/ruby/1.9.1/gems/simplecov-0.5.4/lib/simplecov/source_file.rb:156:ineach'
from /Users/davidherelle/.rvm/gems/ruby-1.9.2-p180@jobteaser.com/ruby/1.9.1/gems/simplecov-0.5.4/lib/simplecov/source_file.rb:156:in process_skipped_lines!' from /Users/davidherelle/.rvm/gems/ruby-1.9.2-p180@jobteaser.com/ruby/1.9.1/gems/simplecov-0.5.4/lib/simplecov/source_file.rb:98:inlines'
from /Users/davidherelle/.rvm/gems/ruby-1.9.2-p180@jobteaser.com/ruby/1.9.1/gems/simplecov-0.5.4/lib/simplecov/source_file.rb:127:in covered_lines' from /Users/davidherelle/.rvm/gems/ruby-1.9.2-p180@jobteaser.com/ruby/1.9.1/gems/simplecov-0.5.4/lib/simplecov/file_list.rb:7:inblock in covered_lines'
from /Users/davidherelle/.rvm/gems/ruby-1.9.2-p180@jobteaser.com/ruby/1.9.1/gems/simplecov-0.5.4/lib/simplecov/file_list.rb:7:in map' from /Users/davidherelle/.rvm/gems/ruby-1.9.2-p180@jobteaser.com/ruby/1.9.1/gems/simplecov-0.5.4/lib/simplecov/file_list.rb:7:incovered_lines'
from /Users/davidherelle/.rvm/gems/ruby-1.9.2-p180@jobteaser.com/ruby/1.9.1/gems/simplecov-0.5.4/lib/simplecov/file_list.rb:30:in lines_of_code' from /Users/davidherelle/.rvm/gems/ruby-1.9.2-p180@jobteaser.com/ruby/1.9.1/gems/simplecov-0.5.4/lib/simplecov/file_list.rb:35:incovered_percent'
from (erb):17:in `block in format'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment