autospec 和缺失的 gem

发布于 2024-09-03 13:33:05 字数 700 浏览 2 评论 0原文

我有一个奇怪的行为或自动规范。在 autospec 运行时,我在控制台中看到

/opt/local/bin/ruby /opt/local/lib/ruby/gems/1.8/gems/cucumber-0.7.3/bin/cucumber --profile autotest-all --format rerun --out /var/folders/xx/xxbiSMYpEjesle1hezvfDU+++TI/-Tmp-/autotest-cucumber20100603-46558-rwbmlp-0 
Missing these required gems:
  cucumber-rails  >= 0.3.1

You're running:
  ruby 1.8.7.249 at /opt/local/bin/ruby
  rubygems 1.3.7 at /Users/alec/.gem/ruby/1.8, /opt/local/lib/ruby/gems/1.8

Run `rake gems:install` to install the missing gems.

但是 gem 已安装,

alec$ gem search cucumber-rails --local

*** LOCAL GEMS ***

cucumber-rails (0.3.1)

这是什么?我已经安装了黄瓜以及应用程序中的所有文件。

i've got a strange behavior or autospec. On autospec run i see in console

/opt/local/bin/ruby /opt/local/lib/ruby/gems/1.8/gems/cucumber-0.7.3/bin/cucumber --profile autotest-all --format rerun --out /var/folders/xx/xxbiSMYpEjesle1hezvfDU+++TI/-Tmp-/autotest-cucumber20100603-46558-rwbmlp-0 
Missing these required gems:
  cucumber-rails  >= 0.3.1

You're running:
  ruby 1.8.7.249 at /opt/local/bin/ruby
  rubygems 1.3.7 at /Users/alec/.gem/ruby/1.8, /opt/local/lib/ruby/gems/1.8

Run `rake gems:install` to install the missing gems.

But gem is installed

alec$ gem search cucumber-rails --local

*** LOCAL GEMS ***

cucumber-rails (0.3.1)

what is it? I have installed cucumber with all files in app.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

梦明 2024-09-10 13:33:05

我已经解决了这个问题。自动测试/自动规范适用于开发环境,但不适用于“黄瓜”环境。只需将 gem 要求添加到您的environment.rb 中,这个问题就可以解决。

I've solved this problem. Autotest/autospec is working with development environment, but noth with 'cucumber' environment. Simply add gem requirement to your environment.rb and this problem will be solved.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文