Rubocop returned exit code 2

Answered

I started a clean new Rails app to test out Rubymine and when I did this and installed Rubocop, I got an error:

"Rubocop returned exit code 2, see IDE log for details"

In that log it shows:

Error:Rubocop returned exit code: 2
stdout:
{"metadata":{"rubocop_version":"0.59.0","ruby_engine":"ruby","ruby_version":"2.5.1","ruby_patchlevel":"57","ruby_platform":"x86_64-darwin18"},"files":[],"summary":{"offense_count":0,"target_file_count":1,"inspected_file_count":0}}
stderr:
Unknown Ruby version: 2.0
/Users/bro/.rvm/gems/ruby-2.5.1/gems/rubocop-0.59.0/lib/rubocop/processed_source.rb:189:in `parser_class'
/Users/bro/.rvm/gems/ruby-2.5.1/gems/rubocop-0.59.0/lib/rubocop/processed_source.rb:197:in `create_parser'
/Users/bro/.rvm/gems/ruby-2.5.1/gems/rubocop-0.59.0/lib/rubocop/processed_source.rb:154:in `parse'
/Users/bro/.rvm/gems/ruby-2.5.1/gems/rubocop-0.59.0/lib/rubocop/processed_source.rb:36:in `initialize'
/Users/bro/.rvm/gems/ruby-2.5.1/gems/rubocop-0.59.0/lib/rubocop/runner.rb:343:in `new'
/Users/bro/.rvm/gems/ruby-2.5.1/gems/rubocop-0.59.0/lib/rubocop/runner.rb:343:in `get_processed_source'
/Users/bro/.rvm/gems/ruby-2.5.1/gems/rubocop-0.59.0/lib/rubocop/runner.rb:114:in `block in file_offenses'
/Users/bro/.rvm/gems/ruby-2.5.1/gems/rubocop-0.59.0/lib/rubocop/runner.rb:133:in `file_offense_cache'
/Users/bro/.rvm/gems/ruby-2.5.1/gems/rubocop-0.59.0/lib/rubocop/runner.rb:113:in `file_offenses'
/Users/bro/.rvm/gems/ruby-2.5.1/ ...


What should I do to resolve this?
1 comment
Comment actions Permalink

Hello,

sorry for the delay. I've checked it with Ruby 2.5.1 and RuboCop 0.59.0 in RubyMine 2018.3.1 EAP but didn't manage to reproduce. What IDE's version are you using? Have you tried the last 2018.3.1 EAP?

0

Please sign in to leave a comment.