问题
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')".
I have Scala 2.10 installed using MacPorts.
I am running OS X Lion (10.8.3).
Is there some special configuration I need to tell SublimeREPL where to find the Scala executable?
回答1:
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
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"}
},
来源:https://stackoverflow.com/questions/15641416/sublimerepl-scala-error