本文介绍了SublimeREPL Scala错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我安装了SublimeREPL,但是每次尝试启动REPL时,都会出现一个对话框,显示错误"OSError(2,'No such file or directory')".

I installed SublimeREPL, but every time I try to launch the REPL, I get a dialog showing the error "OSError(2, 'No such file or directory')".

我已经使用MacPorts安装了Scala 2.10.

I have Scala 2.10 installed using MacPorts.

我正在运行OS X Lion(10.8.3).

I am running OS X Lion (10.8.3).

我是否需要告诉SublimeREPL一些特殊的配置,以在哪里找到Scala可执行文件?

Is there some special configuration I need to tell SublimeREPL where to find the Scala executable?

推荐答案

在Sublime Text安装目录(可能位于~/Library/Application Support/Sublime Text 2下)中,有一个配置文件:

In your Sublime Text installation directory (it will likely be under ~/Library/Application Support/Sublime Text 2), there's a configuration file:

./Packages/SublimeREPL/config/Scala/Main.sublime-menu

scala的路径及其调用由以下方式定义:

The path to scala and its invocation are defined by:

"cmd": {"linux": ["scala"],
        "osx": ["scala"],
        "windows": ["scala.bat", "-i"]
       },
...
"extend_env": {"osx": {"EMACS": "1", "PATH": "{PATH}:/usr/local/bin"},
               "linux": {"EMACS": "1", "PATH": "{PATH}:/usr/local/bin"},
               "windows": {"EMACS": "1"}
},

这篇关于SublimeREPL Scala错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-13 10:58