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

RuboCop not working on RubyMine 8.0.3 and plugin 3.1.0 #35

Open tit opened 8 years ago

tit commented 8 years ago

Hi. I have: RubyMine 8.0.3 Plugin RuboCop 3.1.0 Gem RuboCop 0.35.1

RubyMine It shows no errors, but not corrected my code.

My bad code

bad_code

Log from RubyMine

idea_log.txt

In Inspection settings RubyCop is exist

inspection

RuboCop gem is installed

rubocop_gems

Plugin is 3.1.0 version

rubocop_plugin

Ruby version is 2.0.0

ruby_version

RubyMine version is 8.0.3

rubymine

hms commented 8 years ago

I have verified the installation and the rest of the requirements -- robocop is working with my Guard settings just fine.

Here is my stack trace: Marker - Dec 25, 2015, 3:30:05 PM 2015-12-25 15:30:10,032 [ 137471] INFO - yhome.idea.vim.ui.ExEntryPanel - deactivate 2015-12-25 15:30:27,192 [ 154631] DEBUG - hub.sirlantis.rubymine.rubocop - Executing RuboCop (SDK=/Users/hspitz/.rvm/rubies/ruby-2.2.3/bin)rubocop --format json /Volumes/Work/dev/imp/rails/lib/utils/pre_commit_checker.rb 2015-12-25 15:30:27,192 [ 154631] INFO - .ruby.ruby.run.RubyCommandLine - Executing [rubocop --format json /Volumes/Work/dev/imp/rails/lib/utils/pre_commit_checker.rb], working dir =[/Volumes/Work/dev/imp/rails] 2015-12-25 15:30:27,199 [ 154638] INFO - figurations.GeneralCommandLine - Cannot run program "rubocop" (in directory "/Volumes/Work/dev/imp/rails"): error=2, No such file or directory java.io.IOException: Cannot run program "rubocop" (in directory "/Volumes/Work/dev/imp/rails"): error=2, No such file or directory at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048) at com.intellij.execution.configurations.GeneralCommandLine.startProcess(GeneralCommandLine.java:368) at com.intellij.execution.configurations.GeneralCommandLine.createProcess(GeneralCommandLine.java:354) at org.jetbrains.plugins.ruby.ruby.run.RubyCommandLine.createProcess(RubyCommandLine.java:64) at io.github.sirlantis.rubymine.rubocop.RubocopTask$runViaCommandLine$1.invoke(RubocopTask.kt:173) at io.github.sirlantis.rubymine.rubocop.RubocopTask$runViaCommandLine$1.invoke(RubocopTask.kt:25) at io.github.sirlantis.rubymine.rubocop.RubocopTask.parseProcessOutput(RubocopTask.kt:67) at io.github.sirlantis.rubymine.rubocop.RubocopTask.runViaCommandLine(RubocopTask.kt:173) at io.github.sirlantis.rubymine.rubocop.RubocopTask.run(RubocopTask.kt:60) at io.github.sirlantis.rubymine.rubocop.RubocopAnnotator.doAnnotate(RubocopAnnotator.kt:157) at io.github.sirlantis.rubymine.rubocop.RubocopAnnotator.doAnnotate(RubocopAnnotator.kt:24) at com.intellij.codeInsight.daemon.impl.ExternalToolPass.a(ExternalToolPass.java:218) at com.intellij.codeInsight.daemon.impl.ExternalToolPass.access$500(ExternalToolPass.java:44) at com.intellij.codeInsight.daemon.impl.ExternalToolPass$1.run(ExternalToolPass.java:160) at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:337) at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:327) at com.intellij.util.ui.update.MergingUpdateQueue$3.run(MergingUpdateQueue.java:271) at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:286) at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:244) at com.intellij.util.ui.update.MergingUpdateQueue.run(MergingUpdateQueue.java:234) at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238) at com.intellij.util.Alarm$Request$1.run(Alarm.java:352) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at com.intellij.util.concurrency.QueueProcessor$RunnableConsumer.consume(QueueProcessor.java:298) at com.intellij.util.concurrency.QueueProcessor$RunnableConsumer.consume(QueueProcessor.java:295) at com.intellij.util.concurrency.QueueProcessor$2$1.run(QueueProcessor.java:110) at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238) at com.intellij.util.concurrency.QueueProcessor$2.consume(QueueProcessor.java:107) at com.intellij.util.concurrency.QueueProcessor$2.consume(QueueProcessor.java:104) at com.intellij.util.concurrency.QueueProcessor$3$1.run(QueueProcessor.java:215) at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238) at com.intellij.util.concurrency.QueueProcessor$3.run(QueueProcessor.java:212) at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:365) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) at org.jetbrains.ide.PooledThreadExecutor$1$1.run(PooledThreadExecutor.java:55) Caused by: java.io.IOException: error=2, No such file or directory at java.lang.UNIXProcess.forkAndExec(Native Method) at java.lang.UNIXProcess.(UNIXProcess.java:248) at java.lang.ProcessImpl.start(ProcessImpl.java:134) at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029) ... 39 more 2015-12-25 15:30:27,200 [ 154639] WARN - hub.sirlantis.rubymine.rubocop - Failed to run RuboCop command com.intellij.execution.process.ProcessNotCreatedException: Cannot run program "rubocop" (in directory "/Volumes/Work/dev/imp/rails"): error=2, No such file or directory at com.intellij.execution.configurations.GeneralCommandLine.createProcess(GeneralCommandLine.java:358) at org.jetbrains.plugins.ruby.ruby.run.RubyCommandLine.createProcess(RubyCommandLine.java:64) at io.github.sirlantis.rubymine.rubocop.RubocopTask$runViaCommandLine$1.invoke(RubocopTask.kt:173) at io.github.sirlantis.rubymine.rubocop.RubocopTask$runViaCommandLine$1.invoke(RubocopTask.kt:25) at io.github.sirlantis.rubymine.rubocop.RubocopTask.parseProcessOutput(RubocopTask.kt:67) at io.github.sirlantis.rubymine.rubocop.RubocopTask.runViaCommandLine(RubocopTask.kt:173) at io.github.sirlantis.rubymine.rubocop.RubocopTask.run(RubocopTask.kt:60) at io.github.sirlantis.rubymine.rubocop.RubocopAnnotator.doAnnotate(RubocopAnnotator.kt:157) at io.github.sirlantis.rubymine.rubocop.RubocopAnnotator.doAnnotate(RubocopAnnotator.kt:24) at com.intellij.codeInsight.daemon.impl.ExternalToolPass.a(ExternalToolPass.java:218) at com.intellij.codeInsight.daemon.impl.ExternalToolPass.access$500(ExternalToolPass.java:44) at com.intellij.codeInsight.daemon.impl.ExternalToolPass$1.run(ExternalToolPass.java:160) at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:337) at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:327) at com.intellij.util.ui.update.MergingUpdateQueue$3.run(MergingUpdateQueue.java:271) at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:286) at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:244) at com.intellij.util.ui.update.MergingUpdateQueue.run(MergingUpdateQueue.java:234) at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238) at com.intellij.util.Alarm$Request$1.run(Alarm.java:352) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at com.intellij.util.concurrency.QueueProcessor$RunnableConsumer.consume(QueueProcessor.java:298) at com.intellij.util.concurrency.QueueProcessor$RunnableConsumer.consume(QueueProcessor.java:295) at com.intellij.util.concurrency.QueueProcessor$2$1.run(QueueProcessor.java:110) at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238) at com.intellij.util.concurrency.QueueProcessor$2.consume(QueueProcessor.java:107) at com.intellij.util.concurrency.QueueProcessor$2.consume(QueueProcessor.java:104) at com.intellij.util.concurrency.QueueProcessor$3$1.run(QueueProcessor.java:215) at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238) at com.intellij.util.concurrency.QueueProcessor$3.run(QueueProcessor.java:212) at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:365) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) at org.jetbrains.ide.PooledThreadExecutor$1$1.run(PooledThreadExecutor.java:55) Caused by: java.io.IOException: Cannot run program "rubocop" (in directory "/Volumes/Work/dev/imp/rails"): error=2, No such file or directory at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048) at com.intellij.execution.configurations.GeneralCommandLine.startProcess(GeneralCommandLine.java:368) at com.intellij.execution.configurations.GeneralCommandLine.createProcess(GeneralCommandLine.java:354) ... 37 more Caused by: java.io.IOException: error=2, No such file or directory at java.lang.UNIXProcess.forkAndExec(Native Method) at java.lang.UNIXProcess.(UNIXProcess.java:248) at java.lang.ProcessImpl.start(ProcessImpl.java:134) at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029) ... 39 more 2015-12-25 15:30:27,200 [ 154639] ERROR - hub.sirlantis.rubymine.rubocop - Failed to run RuboCop command - is it installed? (SDK=/Users/hspitz/.rvm/rubies/ruby-2.2.3/bin) com.intellij.execution.process.ProcessNotCreatedException: Cannot run program "rubocop" (in directory "/Volumes/Work/dev/imp/rails"): error=2, No such file or directory at com.intellij.execution.configurations.GeneralCommandLine.createProcess(GeneralCommandLine.java:358) at org.jetbrains.plugins.ruby.ruby.run.RubyCommandLine.createProcess(RubyCommandLine.java:64) at io.github.sirlantis.rubymine.rubocop.RubocopTask$runViaCommandLine$1.invoke(RubocopTask.kt:173) at io.github.sirlantis.rubymine.rubocop.RubocopTask$runViaCommandLine$1.invoke(RubocopTask.kt:25) at io.github.sirlantis.rubymine.rubocop.RubocopTask.parseProcessOutput(RubocopTask.kt:67) at io.github.sirlantis.rubymine.rubocop.RubocopTask.runViaCommandLine(RubocopTask.kt:173) at io.github.sirlantis.rubymine.rubocop.RubocopTask.run(RubocopTask.kt:60) at io.github.sirlantis.rubymine.rubocop.RubocopAnnotator.doAnnotate(RubocopAnnotator.kt:157) at io.github.sirlantis.rubymine.rubocop.RubocopAnnotator.doAnnotate(RubocopAnnotator.kt:24) at com.intellij.codeInsight.daemon.impl.ExternalToolPass.a(ExternalToolPass.java:218) at com.intellij.codeInsight.daemon.impl.ExternalToolPass.access$500(ExternalToolPass.java:44) at com.intellij.codeInsight.daemon.impl.ExternalToolPass$1.run(ExternalToolPass.java:160) at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:337) at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:327) at com.intellij.util.ui.update.MergingUpdateQueue$3.run(MergingUpdateQueue.java:271) at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:286) at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:244) at com.intellij.util.ui.update.MergingUpdateQueue.run(MergingUpdateQueue.java:234) at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238) at com.intellij.util.Alarm$Request$1.run(Alarm.java:352) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at com.intellij.util.concurrency.QueueProcessor$RunnableConsumer.consume(QueueProcessor.java:298) at com.intellij.util.concurrency.QueueProcessor$RunnableConsumer.consume(QueueProcessor.java:295) at com.intellij.util.concurrency.QueueProcessor$2$1.run(QueueProcessor.java:110) at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238) at com.intellij.util.concurrency.QueueProcessor$2.consume(QueueProcessor.java:107) at com.intellij.util.concurrency.QueueProcessor$2.consume(QueueProcessor.java:104) at com.intellij.util.concurrency.QueueProcessor$3$1.run(QueueProcessor.java:215) at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238) at com.intellij.util.concurrency.QueueProcessor$3.run(QueueProcessor.java:212) at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:365) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) at org.jetbrains.ide.PooledThreadExecutor$1$1.run(PooledThreadExecutor.java:55) Caused by: java.io.IOException: Cannot run program "rubocop" (in directory "/Volumes/Work/dev/imp/rails"): error=2, No such file or directory at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048) at com.intellij.execution.configurations.GeneralCommandLine.startProcess(GeneralCommandLine.java:368) at com.intellij.execution.configurations.GeneralCommandLine.createProcess(GeneralCommandLine.java:354) ... 37 more Caused by: java.io.IOException: error=2, No such file or directory at java.lang.UNIXProcess.forkAndExec(Native Method) at java.lang.UNIXProcess.(UNIXProcess.java:248) at java.lang.ProcessImpl.start(ProcessImpl.java:134) at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029) ... 39 more 2015-12-25 15:30:27,201 [ 154640] ERROR - hub.sirlantis.rubymine.rubocop - RubyMine 8.0.3 Build #RM-143.1559.2 2015-12-25 15:30:27,201 [ 154640] ERROR - hub.sirlantis.rubymine.rubocop - JDK: 1.8.0_40-release 2015-12-25 15:30:27,201 [ 154640] ERROR - hub.sirlantis.rubymine.rubocop - VM: OpenJDK 64-Bit Server VM 2015-12-25 15:30:27,201 [ 154640] ERROR - hub.sirlantis.rubymine.rubocop - Vendor: JetBrains s.r.o 2015-12-25 15:30:27,201 [ 154640] ERROR - hub.sirlantis.rubymine.rubocop - OS: Mac OS X 2015-12-25 15:30:27,201 [ 154640] ERROR - hub.sirlantis.rubymine.rubocop - Last Action: VimShortcutKeyAction

kenchan0130 commented 8 years ago

+1, me too

peterox commented 8 years ago

I am getting this also

davidguthu commented 8 years ago

:+1:

jwg2s commented 8 years ago

:+1:

pkang commented 8 years ago

+1

GuilhermeBento commented 8 years ago

image

oviron commented 8 years ago

Same here

Peterortiz82 commented 8 years ago

+1

cschroed commented 8 years ago

+1 please let us know if there is a solution

coding-bunny commented 8 years ago

same issue. Waiting for 3.1 to be patched and working. Downgrading to 3.0.1 works and makes it work again, but rather have the new version working

Serg0 commented 8 years ago

I can recoment you to install rubocop gem and bundler globaly. Arter that I am starting RubyMine using shurtcut and RuboCop plugin works fine.

johnthagen commented 8 years ago

+1 though because (I think) I am running on Windows, downgrading to 3.0.1 still does not solve the problem and results in:

Failed to parse RuboCop output
Please make sure that:
     you installed RuboCop for this Ruby version
     your Rubo cop version isn't ancient

RubyMine 8.0.3 Ruby 1.9.3 Gem rubocop 0.37.2

Edit: Created a Gemfile solved the first problem, but still fails on #32

O1O1O1O commented 8 years ago

Still a problem - same configuration here except with RubyMine 8.0.4 and Ruby 2.3.0

Installed 3.0.1 manually as per suggestion of @NekoNova and all is good.