SyntaxError: (RegexpError) incompatible character encoding: /\u0085/

Hi Ruby plugin team,
We are getting an exception when we run an rspec test in IntelliJ. It is rather inconsistent and not isolated to one test. We run the spec and the error occurs, we comment out the spec and it still occurs but when we comment out a bunch of specs it doesn't occur.
We do not get this error at all when we run rspect from the command line.


Is this a known bug? Our files are stored in perforce as UTF8....

/Users/dheath/.rvm/rubies/jruby-1.6.4/bin/jruby -J-cp /Users/dheath/Workspace/WEB__dheath__comments/_INTEGRATION_/comments/out/production/comments --1.9 -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /Users/dheath/.rvm/gems/jruby-1.6.4@comments/bin/rspec /Users/dheath/Workspace/WEB__dheath__comments/_INTEGRATION_/comments/spec/controllers/comments_controller_spec.rb --require teamcity/spec/runner/formatter/teamcity/formatter --format Spec::Runner::Formatter::TeamcityFormatter --example CommentsController#create
Testing started at 3:38 PM ...
SyntaxError: (RegexpError) incompatible character encoding: /\u0085/
  replace_escaped_symbols at /Users/dheath/Library/Application Support/IntelliJIdea10/ruby/rb/testing/patch/common/teamcity/utils/service_message_factory.rb:192
           create_message at /Users/dheath/Library/Application Support/IntelliJIdea10/ruby/rb/testing/patch/common/teamcity/utils/service_message_factory.rb:235
                     each at org/jruby/RubyHash.java:1175
                      map at org/jruby/RubyEnumerable.java:729
           create_message at /Users/dheath/Library/Application Support/IntelliJIdea10/ruby/rb/testing/patch/common/teamcity/utils/service_message_factory.rb:235
    create_suite_finished at /Users/dheath/Library/Application Support/IntelliJIdea10/ruby/rb/testing/patch/common/teamcity/utils/service_message_factory.rb:59
      close_example_group at /Users/dheath/Library/Application Support/IntelliJIdea10/ruby/rb/testing/patch/bdd/teamcity/spec/runner/formatter/teamcity/formatter.rb:526
             dump_summary at /Users/dheath/Library/Application Support/IntelliJIdea10/ruby/rb/testing/patch/bdd/teamcity/spec/runner/formatter/teamcity/formatter.rb:376
                 __send__ at org/jruby/RubyBasicObject.java:1712
                     send at org/jruby/RubyKernel.java:2125
                   notify at /Users/dheath/.rvm/gems/jruby-1.6.4@comments/gems/rspec-core-2.6.4/lib/rspec/core/reporter.rb:75
                     each at org/jruby/RubyArray.java:1603
                   notify at /Users/dheath/.rvm/gems/jruby-1.6.4@comments/gems/rspec-core-2.6.4/lib/rspec/core/reporter.rb:74
                   finish at /Users/dheath/.rvm/gems/jruby-1.6.4@comments/gems/rspec-core-2.6.4/lib/rspec/core/reporter.rb:24
                   report at /Users/dheath/.rvm/gems/jruby-1.6.4@comments/gems/rspec-core-2.6.4/lib/rspec/core/reporter.rb:14
                      run at /Users/dheath/.rvm/gems/jruby-1.6.4@comments/gems/rspec-core-2.6.4/lib/rspec/core/command_line.rb:21
           run_in_process at /Users/dheath/.rvm/gems/jruby-1.6.4@comments/gems/rspec-core-2.6.4/lib/rspec/core/runner.rb:80
                      run at /Users/dheath/.rvm/gems/jruby-1.6.4@comments/gems/rspec-core-2.6.4/lib/rspec/core/runner.rb:69
                  autorun at /Users/dheath/.rvm/gems/jruby-1.6.4@comments/gems/rspec-core-2.6.4/lib/rspec/core/runner.rb:11
Process finished with exit code 1

1 comment
Comment actions Permalink

I had this problem too with JRuby 1.6.4 and language level 1.9.
Fixed it by patching ruby plugin.

# encoding: UTF-8

in file
~\.IntelliJIdea10\config\plugins\ruby\rb\testing\patch\common\teamcity\utils\service_message_factory.rb

add first line, saying

# encoding: UTF-8

Jetbrains guys, please fix it in upstream.

0

Please sign in to leave a comment.