测试在 shell 中有效,但在 Textmate 中无效
如果我直接在 Textmate 中运行 Rails 的单元测试,则会收到以下错误:
rake aborted!未初始化的常量对象::Bundler /Users/markus/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rake.rb:2482:in const_missing' /Users/xxx/tickets/config/ boot.rb:9:在 ' /Users/xxx/tickets/config/boot.rb:5:in ' :29:in
require' 中救援 :29:in require' /Users/xxx /tickets/config/application.rb:1:in ':29:in
require' :29:in require' /Users/xxx/tickets/Rakefile:4:in '/Users/xxx/ .rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rake.rb:2373:加载中'/Users/xxx/.rvm/rubies/ruby-1.9.2- […] 完成
如果我使用 rake test:units
在 shell 中运行测试,一切都会很好。怎么了?
If I run rails' unit tests directly in Textmate, I get the following error:
rake aborted! uninitialized constant Object::Bundler /Users/markus/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rake.rb:2482:in const_missing' /Users/xxx/tickets/config/boot.rb:9:in rescue in ' /Users/xxx/tickets/config/boot.rb:5:in ' :29:in
require' :29:in require' /Users/xxx/tickets/config/application.rb:1:in ' :29:in
require' :29:in require' /Users/xxx/tickets/Rakefile:4:in ' /Users/xxx/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rake.rb:2373:in load' /Users/xxx/.rvm/rubies/ruby-1.9.2-
[…]
Done
If I run the tests in my shell with rake test:units
everything is fine. What is wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您有 RVM,那么您应该执行以下操作:
http://rvm.beginrescueend.com/integration/textmate/
就像一个魅力。
这里的问题是您的 textmate 环境找不到捆绑器,因为它找不到您的 gemset 文件夹。
如果您点击上面的链接,一切都应该没问题。
干杯,
If you have RVM then you should do this:
http://rvm.beginrescueend.com/integration/textmate/
works like a charm.
Youre problem here is that your textmate environment doesn't find bundler, because it can't find your gemset folder.
If you follow the link above, everything should be fine.
Cheers,