RSpec TextMate 捆绑包 [spec/autorun (LoadError)]
因此,我更新到最新的 RSpec TextMate Bundle 并且我无法再运行规范测试“命令R”。
- 我安装了 TextMate 的干净版本。
- 安装了 Rspec 版本 1.3.1 并且可执行文件正在运行
- 我的项目是由 Mr. Bones 生成的 gem。
- 未安装 RVM
项目目录如下所示
my_gem_project
spec
model_spec.rb
spec_helper.rb
当我从 textmate 运行“Command R”来执行规范时,我收到此 spec/autorun LoadError
/Users/jspooner/Library/Application Support/TextMate/Bundles/RSpec.tmbundle/Support/lib/rspec/mate.rb:43:in `require': no such file to load -- spec/autorun (LoadError) from /Users/jspooner/Library/Application Support/TextMate/Bundles/RSpec.tmbundle/Support/lib/rspec/mate.rb:43 from /tmp/textmate-command-767.rb:2:in `require' from /tmp/textmate-command-767.rb:2
问题出在 RSpec.tmbundle/Support/lib/spec/ mate.rb 因为它需要 spec,这会引发 LoadError: no such file to load —spec
错误。
我不确定为什么会出现这个错误。我可以在命令行上键入spec,但不能在由textmate 运行的文件中要求它。
这是我当前的 gem 版本。
gem list --local | grep spec
blue_light_special (0.2.0)
rspec (1.3.1)
rspec-rails (1.3.3)
So I updated to the latest RSpec TextMate Bundle and I'm no longer able to run spec test with "Command R".
- I have a clean version version of TextMate installed.
- Rspec version 1.3.1 installed and the executable is working
- My project is a gem generated by Mr. Bones.
- No RVM installed
The Project Directory looks like this
my_gem_project
spec
model_spec.rb
spec_helper.rb
When I run "Command R" from textmate to execute a spec I get this spec/autorun LoadError
/Users/jspooner/Library/Application Support/TextMate/Bundles/RSpec.tmbundle/Support/lib/rspec/mate.rb:43:in `require': no such file to load -- spec/autorun (LoadError) from /Users/jspooner/Library/Application Support/TextMate/Bundles/RSpec.tmbundle/Support/lib/rspec/mate.rb:43 from /tmp/textmate-command-767.rb:2:in `require' from /tmp/textmate-command-767.rb:2
The problem is with RSpec.tmbundle/Support/lib/spec/mate.rb because it requires spec which raises a LoadError: no such file to load — spec
error.
I'm not sure why this error is raised. I can type spec on the command line but I can't require it in a file that is run by textmate.
Here are my current gem versions.
gem list --local | grep spec
blue_light_special (0.2.0)
rspec (1.3.1)
rspec-rails (1.3.3)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我遇到了同样的问题,因为较新版本的 rspec 包不需要 rubygems - 这对于使用其他包管理系统(即 Bundler)的人来说是有效的。
排序的最简单方法是在 textmate 中添加一个变量 - 详细信息位于 rspec-bundle github README - http ://github.com/rspec/rspec-tmbundle
I had the same problem it's because newer versions of the rspec bundle don't require rubygems - this is so it works for people who use other package managing systems (ie Bundler).
The easiest way to sort this is to add a variable in textmate - details are on the rspec-bundle github README - http://github.com/rspec/rspec-tmbundle