Rspec RubyTest for Sublime Text 3系统能否找到指定的路径
我试图用RubyTest包在我的sublime text 3上运行rspec测试,但我遇到了这个错误Rspec RubyTest for Sublime Text 3系统能否找到指定的路径,rspec,sublimetext,sublimetext3,ruby-test,Rspec,Sublimetext,Sublimetext3,Ruby Test,我试图用RubyTest包在我的sublime text 3上运行rspec测试,但我遇到了这个错误 The system cannot find the path specified. [Finished in 0.0s with exit code 1] [cmd: ['rspec spec\\requests\\static_pages_spec.rb -l15']] [dir: H:\Sites\wedding_app] [path: C:\ImageMagick-6.8.7
The system cannot find the path specified.
[Finished in 0.0s with exit code 1]
[cmd: ['rspec spec\\requests\\static_pages_spec.rb -l15']]
[dir: H:\Sites\wedding_app]
[path: C:\ImageMagick-6.8.7-Q16;C:\RailsInstaller\Ruby2.0.0\bin;C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files (x86)\AMD APP\bin\x86;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\RailsInstaller\Ruby2.0.0\bin]
我很清楚问题是什么,但我不知道如何解决问题。问题是在cmd中运行测试时出现了双反斜杠,因此它找不到要测试的实际.rb文件
[cmd: ['rspec spec\\requests\\static_pages_spec.rb -l15']]
注意:我已经尝试在RubyTest设置中删除{relative_path},它运行rspec很好,但是现在我无法运行指定的测试。我开始认为这更多的是与升华文本3有关,而不是与RubyTest有关,因为RubyTest在我的升华文本2上工作得很好
有人知道如何解决这个问题吗?错误消息实际上意味着Sublime找不到
rspec
命令。原因是您的路径不正确-没有代码>介于ImageMagick-6.8.7
和C:\RailsInstaller\Ruby2.0.0\bin
之间。另外,程序文件
和\RailsInstaller
之间还有一个空格。将path变量设置为以下值:
C:\ImageMagick-6.8.7;C:\RailsInstaller\Ruby2.0.0\bin;C:\Program(x86)\AMD\APP\bin\x86_64;C:\Program Files\RailsInstaller\Ruby2.0.0\bin
假设rspec
在其中一个目录中,您应该已经准备好了 cmd作为数组传递,而它应该是字符串。也许这在升华文本2中有效,但在升华文本3中无效
一个为我解决这个问题的解决方案(Win7,Sublime Text 3)是在RubyTest文件夹的run_ruby_test.py中编辑代码
第202行:更改此项:
"cmd": [command],
到
希望有帮助谢谢你的快速回答,但是我相信你的答案是我以前考虑过的,并且试图修复任何缺失的路径不是问题。你是对的,没有;在Imagick和Railsinattler之间。这可能是由于复制和粘贴错误造成的。C:\ImageMagick-6.8.7-Q16;C:\RailsInstaller\Ruby2.0.0\bin;C:\ProgramFiles(x86)\AMD APP\bin\x86\u 64;C:\ProgramFiles(x86)\AMD APP\bin\x86;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\SSystem32\WindowsPowerShell\v1.0\;C:\Program Files(x86)\ATI Technologies\ATI.ACE\Core Static;C:\RailsInstaller\Ruby2.0.0\binI还通过仅使用rspec删除{relative_path}进行测试,它工作正常,但现在无法运行特定测试
"cmd": command,