gpt4 book ai didi

linux - SublimeREPL scala 错误...同样的错误,但现有的解决方案无法解决问题

转载 作者:太空宇宙 更新时间:2023-11-04 04:10:28 24 4
gpt4 key购买 nike

运行SublimeREPL:打开文件夹的SBT时,我遇到了与The similar question asked before中完全相同的问题(OSError(2, '没有这样的文件或目录'))。

不幸的是,那里提供的解决方案并没有多大帮助。

有人愿意提供一些线索来说明这里仍然可能存在问题吗?

我目前运行的是 Ubuntu 12.04。

我的Main.sublime-menu配置如下:

[
{
"id": "tools",
"children":
[{
"caption": "SublimeREPL",
"mnemonic": "r",
"id": "SublimeREPL",
"children":
[
{"caption": "Scala",
"id": "Scala",

"children":[
{"command": "repl_open",
"caption": "scala REPL",
"id": "repl_scala",
"mnemonic": "s",
"args": {
"type": "subprocess",
"encoding": "utf8",
"external_id": "scala",
"cmd": {"linux": ["scala"],
"osx": ["scala"],
"windows": ["scala.bat", "-i"]},
"soft_quit": "\nexit\n",
"cwd": "$file_path",
"cmd_postfix": "\n",
"extend_env": {"osx": {"EMACS": "1", "PATH": "{PATH}:/home/helluin/apps/sbt/bin"},
"linux": {"EMACS": "1", "PATH": "{PATH}:/home/helluin/apps/sbt/bin/"},
"windows": {"EMACS": "1"}},
"suppress_echo": false,
"syntax": "Packages/Scala/Scala.tmLanguage"
}
},
{"command": "repl_open",
"caption": "SBT for opened folder",
"id": "repl_sbt",
"mnemonic": "b",
"args": {
"type": "subprocess",
"encoding": "utf8",
"external_id": "scala",
"cmd": {"linux": ["sbt"],
"osx": ["sbt"],
"windows": ["sbt"]},
"soft_quit": "\nexit\n",
"cwd": "$folder",
"cmd_postfix": "\n",
"extend_env": {"osx": {"EMACS": "1", "PATH": "{PATH}:/usr/bin"},
"linux": {"EMACS": "1", "PATH": "{PATH}:/usr/bin"},
"windows": {"EMACS": "1"}},
"suppress_echo": false,
"syntax": "Packages/Scala/Scala.tmLanguage"
}
}
]}
]
}]
}
]

此外,scalasbt 系统路径也是这样定义的

λ →  which scala
/usr/bin/scala
λ → which sbt
/home/helluin/apps/sbt/bin/sbt

最佳答案

你的道路混淆了。 "caption": "scala REPL" 菜单项以 scala 作为其命令,但扩展的 PATH/home/helluin/apps/sbt/bin"caption": "SBT for openingedfolder" 项以 sbt 作为其命令,但扩展 PATH/usr/bin。你应该切换它们。

或者,对于 Scala REPL,创建命令的第一行:

"cmd": {"linux": ["/usr/bin/scala"],

(尽管/usr/bin应该已经在系统PATH中)。对于 sbt REPL,创建命令的第一行:

"cmd": {"linux": ["/home/helluin/apps/sbt/bin/sbt"],

然后您就无需担心扩展该特定环境变量。

关于linux - SublimeREPL scala 错误...同样的错误,但现有的解决方案无法解决问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19389747/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com