3

我正在使用 Eclim 在 Vim 中自动完成 Java、Ruby 等。它启动一个 Eclipse 实例。Eclipse 仍然认为我出于某种原因安装了 RVM(我现在使用 rbenv)。知道我应该如何摆脱这个配置问题或解决这个错误吗?

2014-06-22 22:43:10,123 INFO  [org.eclim.plugin.jdt.PluginResources] Setting 'JRE_SRC' to '/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/src.zip'
org.eclipse.core.runtime.CoreException: Exception occurred executing command line.
    at org.eclipse.debug.core.DebugPlugin.exec(DebugPlugin.java:875)
    at org.eclipse.dltk.internal.launching.execution.LocalExecEnvironment.exec(LocalExecEnvironment.java:72)
    at org.eclipse.dltk.launching.ScriptLaunchUtil.runScriptWithInterpreter(ScriptLaunchUtil.java:85)
    at org.eclipse.dltk.ruby.internal.launching.RubyGenericInstall$BuiltinsHelper.generateLines(RubyGenericInstall.java:70)
    at org.eclipse.dltk.ruby.internal.launching.RubyGenericInstall$BuiltinsHelper.load(RubyGenericInstall.java:171)
    at org.eclipse.dltk.ruby.internal.launching.RubyGenericInstall$BuiltinsHelper.getSources(RubyGenericInstall.java:144)
    at org.eclipse.dltk.ruby.internal.launching.RubyGenericInstall.getBuiltinModules(RubyGenericInstall.java:246)
    at org.eclipse.dltk.internal.core.BuiltinProjectFragment.isSupported(BuiltinProjectFragment.java:97)
    at org.eclipse.dltk.internal.core.ScriptProject.computeProjectFragments(ScriptProject.java:673)
    at org.eclipse.dltk.internal.core.ScriptProject.computeProjectFragments(ScriptProject.java:605)
    at org.eclipse.dltk.internal.core.ScriptProject.computeProjectFragments(ScriptProject.java:565)
    at org.eclipse.dltk.internal.core.ScriptProject.getAllProjectFragments(ScriptProject.java:2921)
    at org.eclipse.dltk.internal.core.ScriptProject.getAllProjectFragments(ScriptProject.java:2915)
    at org.eclipse.dltk.core.search.indexing.core.ProjectRequest.run(ProjectRequest.java:67)
    at org.eclipse.dltk.core.search.indexing.AbstractJob.execute(AbstractJob.java:76)
    at org.eclipse.dltk.internal.core.search.processing.JobManager.run(JobManager.java:467)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: Cannot run program "/Users/ivan/.rvm/rubies/ruby-2.0.0-p195/bin/ruby" (in directory "/var/folders/nh/07hs5mmj0hs7fdq3181dwpbc0000gn/T/dltk60850.tmp/scripts"): error=2, No such file or directory
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1042)
    at java.lang.Runtime.exec(Runtime.java:620)
    at org.eclipse.debug.core.DebugPlugin.exec(DebugPlugin.java:871)
    ... 16 more
Caused by: java.io.IOException: error=2, No such file or directory
    at java.lang.UNIXProcess.forkAndExec(Native Method)
    at java.lang.UNIXProcess.<init>(UNIXProcess.java:185)
    at java.lang.ProcessImpl.start(ProcessImpl.java:134)
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1023)
    ... 18 more
4

2 回答 2

5

Eclim 使用 .buildpath 为项目设置配置。检查以确保在 Eclipse 中的任何当前活动/现有项目中都没有剩余的 rvm / ruby​​ 配置文件。

于 2014-06-27T03:26:27.117 回答
1

Eclim 使用.buildpath文件来设置每个项目的配置。我的硬盘上有一个旧项目,它在.buildpath文件的文本中引用了 rvm ruby​​。如果不使用文件查找实用程序(例如locate. 对于这个特定的问题,我曾经locate buildpath | xargs grep rvm在每个构建路径文件中搜索 string rvm。因为堆栈跟踪不指向项目或构建路径文件,所以只有通过这种搜索才能解决问题。

于 2014-06-30T14:40:55.080 回答