mrcljx / rubocop-for-rubymine

DEPRECATED: RubyMine supports RuboCop now
https://blog.jetbrains.com/ruby/2017/01/rubymine-2017-1-eap-2-creating-gemsets-rubocop-support/
MIT License
131 stars 29 forks source link

Plugin runs ruby instead of rubocop command #40

Open m-koepke opened 8 years ago

m-koepke commented 8 years ago

Hi,

I recently got a new mac and installed RubyMine and the rubocop-for-rubymine plugin. I am using rbenv without gemsets.

RubyMine 8 and 8.5 EAP rubocop plugin 3.1

Now RubyMine is unable to run. It seems it is not picking up the rubocop command correctly but instead runs ruby. From the log:

2016-02-24 13:43:11,227 [  10713]   INFO - .ruby.ruby.run.RubyCommandLine - Executing [/Users/mivl/.rbenv/shims/ruby --format json /Users/mivl/work/projects/rails/ohl/ikos_api/spec/models/ops/nachlieferung/order_dispatcher_spec.rb], working dir =[/Users/mivl/work/projects/rails/ohl/ikos_api]
2016-02-24 13:43:11,299 [  10785]   WARN - hub.sirlantis.rubymine.rubocop - Failed to parse RuboCop output

As I was unable to get any documentation of the RubyMine or IntelliJ IDEA, I wasn't really able to figure out why it would run ruby instead of rubocop for me. I basically reverted to a previous version and applied some kotlin changes: changeset This works for me (again: rbenv without gemsets) but obviously is some custom code that was removed before to improve handling of bundler and stuff.

chetanism commented 8 years ago

I have the same issue but with IntelliJ Idea (with ruby plugin).

IntelliJ Idea: 15.0.2 Ruby Plugin: 0.8.3 Rubocop Plugin: 3.1.0 rubocop: 0.37.2 ruby: 2.1.5

Rest of the setup is same as @mvladimirovic.

Following is the debug log (if it helps)

2016-02-23 20:30:05,110 [6974663]   WARN - hub.sirlantis.rubymine.rubocop - RuboCop exited with 1 
2016-02-23 20:30:14,120 [6983673]  DEBUG - hub.sirlantis.rubymine.rubocop - Executing RuboCop (SDK=/Users/chetanv/.rbenv/versions/2.1.5/bin)/Users/chetanv/.rbenv/shims/ruby --format json /Users/chetanv/projects/my_project/some_file.rb 
2016-02-23 20:30:14,120 [6983673]   INFO - .ruby.ruby.run.RubyCommandLine - Executing [/Users/chetanv/.rbenv/shims/ruby --format json /Users/chetanv/projects/my_project/some_file.rb], working dir =[/Users/chetanv/projects/my_project] 
2016-02-23 20:30:14,187 [6983740]   WARN - hub.sirlantis.rubymine.rubocop - Failed to parse RuboCop output 
java.io.EOFException: End of input at line 1 column 1

Rest of the log has stack trace for not being able to read the json output because it's empty.

@mvladimirovic, would it be possible for you to share the plugin zip that you have compiled. Ta.

ghprince commented 8 years ago

+1 same issue here

danmayer commented 8 years ago

same issue, any work arounds?