我在Windows 10上安装了Atom 1.18.0 x64。然后添加了linter-ruby
包,并在config.cson
as suggested here中对其进行了修改:
"linter-ruby":
ignoredExtensions: "erb, md"
rubyExecutablePath: "/home/myusername/.rbenv/shims/ruby"
路径对应于which ruby
(我在Windows 10上的Ubuntu上有Bash)。
当我尝试编辑一些Ruby文件时,我收到此错误:
Error running Ruby Error: Failed to spawn command ruby. Make sure ruby is installed and on your PATH
我尝试了不同的路径,但没有任何帮助。我很确定,Ruby已安装在我的机器上,因为我可以运行我的Rails应用程序。
我如何让我的Atom linter工作?谢谢!
解决方案
我最终完全卸载了Atom,然后在linter-ruby
中安装了C:\Ruby24-x64
依赖项+已安装的Ruby。然后在linter-ruby
设置中将RubyExecutablePath保留为Default: ruby
。现在它有效。