Sublime Text 2 中的 RubyTest [英] RubyTest in Sublime Text 2
问题描述
我正在尝试让 RubyTest 在 Sublime Text 2 中工作. 我按照 Github 自述文件上的说明进行操作并收到以下错误.有谁知道我该如何解决这个问题?
I am trying to get RubyTest to work in Sublime Text 2. I followed the Instruction on the Github Readme and get the following error. Does anyone know how I could fix this?
/bin/sh: rspec: command not found
推荐答案
要使其正常工作,您只需更改 sb2 中 RubyTest 包中的一项设置.
To get this to work you only need to change one setting in the RubyTest package in sb2.
如果你使用的是 rvm,你的 rspec gem 是通过 rvm 安装的,在/bin/sh 中找不到
If you are using rvm, your rspec gem is installed through rvm and is not found in /bin/sh
所以你需要为 Sublime Text 2 设置 RubyTest 包来自动检查你的 rvm 环境变量.
So you need to set the RubyTest package for Sublime Text 2 to automatically check for your rvm environment variables.
要更改的内容:
1) 在 Sublime Text 2 中,转到 Preferences|Browse Packages.这将打开您的包目录.
1) In Sublime Text 2, go to Preferences|Browse Packages. This will open up your packages directory.
2) 打开RubyTest"目录并查找文件RubyTest.sublime-settings".
2) Open the 'RubyTest' directory and look for the file 'RubyTest.sublime-settings'.
3) 找到以下内容:
"check_for_rvm": false,
并将其更改为:
"check_for_rvm": true,
保存更改.
4) 就是这样.它现在应该可以工作了.
4) That's it. It should now work.
祝你好运
这篇关于Sublime Text 2 中的 RubyTest的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!