jasmine:ci throwing "invalid byte sequence in US-ASCII" #93

Closed
vvgomes opened this Issue Jun 26, 2012 · 2 comments

2 participants

@vvgomes

I have a spec with some UTF-8 characters that looks like that:

it('should display a message for expired poll', function() {
  startCountdown(fakeClock(true), dom);
  expect(dom.message().val()).toBe('Votação encerrada.');
});

When I run $ bundle exec rake jasmine:ci the output looks like this:

/Users/vgomes/.rvm/rubies/ruby-1.9.3-p194/bin/ruby -S rspec /Users/vgomes/codes/jasmine-gem/lib/jasmine/runner.rb --colour --format progress
/Users/vgomes/codes/jasmine-gem/lib/jasmine/spec_builder.rb:40:in `match': invalid byte sequence in US-ASCII (ArgumentError)
    from /Users/vgomes/codes/jasmine-gem/lib/jasmine/spec_builder.rb:40:in `block (3 levels) in guess_example_locations'
    from /Users/vgomes/codes/jasmine-gem/lib/jasmine/spec_builder.rb:39:in `each'
    from /Users/vgomes/codes/jasmine-gem/lib/jasmine/spec_builder.rb:39:in `block (2 levels) in guess_example_locations'
    from /Users/vgomes/codes/jasmine-gem/lib/jasmine/spec_builder.rb:38:in `open'
    from /Users/vgomes/codes/jasmine-gem/lib/jasmine/spec_builder.rb:38:in `block in guess_example_locations'
    from /Users/vgomes/codes/jasmine-gem/lib/jasmine/spec_builder.rb:36:in `each'
    from /Users/vgomes/codes/jasmine-gem/lib/jasmine/spec_builder.rb:36:in `guess_example_locations'
    from /Users/vgomes/codes/jasmine-gem/lib/jasmine/spec_builder.rb:16:in `start'
    from /Users/vgomes/codes/jasmine-gem/lib/jasmine/runner.rb:30:in `<top (required)>'
    from /Users/vgomes/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.10.1/lib/rspec/core/configuration.rb:746:in `load'
    from /Users/vgomes/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.10.1/lib/rspec/core/configuration.rb:746:in `block in load_spec_files'
    from /Users/vgomes/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.10.1/lib/rspec/core/configuration.rb:746:in `map'
    from /Users/vgomes/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.10.1/lib/rspec/core/configuration.rb:746:in `load_spec_files'
    from /Users/vgomes/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.10.1/lib/rspec/core/command_line.rb:22:in `run'
    from /Users/vgomes/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.10.1/lib/rspec/core/runner.rb:69:in `run'
    from /Users/vgomes/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.10.1/lib/rspec/core/runner.rb:10:in `block in autorun'
rake aborted!
/Users/vgomes/.rvm/rubies/ruby-1.9.3-p194/bin/ruby -S rspec /Users/vgomes/codes/jasmine-gem/lib/jasmine/runner.rb --colour --format progress failed

Tasks: TOP => jasmine_continuous_integration_runner
(See full trace by running task with --trace)

As you can see, I'm running on Ruby 1.9.3-p194. Does anyone know how I can make this work? I have already tried to add # encoding: UTF-8 in the spec_builder.rb but it didn't fix the problem. (sorry if the issue was already adressed.)

@vvgomes

A workaround is running $ RUBYOPT=-Ku bundle exec rake jasmine:ci. That works only for recent Ruby versions though.

Any thoughts?

Thanks

@jboyens
Jasmine member

Seems to be fine on 1.9.3 and HEAD.

Let me know if there is something Jasmine can to do resolve this situation, I'm not great with I18n issues, so I'd be very receptive to advice.

@jboyens jboyens closed this Jul 25, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment