繁体   English   中英

“耙黄瓜”坚称这些宝石没有安装,尽管它们显然是

[英]“rake cucumber” insists these gems aren't installed, though they clearly are

我遇到了两个非常相似的问题,但那里的答案显然不适用于我的问题,因此我得出了相同的错误,但原因有所不同。

基本上,我已经安装了rspec-rails和黄瓜-rails,但是我似乎无法说服它。

chuckhoffman@Lucky-Charm:~/projects/siteman/current(rspec)$ rake cucumber
(in /Users/chuckhoffman/projects/siteman/releases/siteman)
DEPRECATION WARNING: require "activesupport" is deprecated and will be removed in Rails 3. Use require "active_support" instead. (called from /Users/chuckhoffman/.rvm/gems/ruby-1.8.7-p334@rails2/gems/activesupport-2.3.11/lib/activesupport.rb:2)
 [FSTR] Using Red Five FileStorage version 0.1
/Users/chuckhoffman/.rvm/rubies/ruby-1.8.7-p334/bin/ruby -I "/Users/chuckhoffman/.rvm/gems/ruby-1.8.7-p334@rails2/gems/cucumber-0.10.0/lib:lib" "/Users/chuckhoffman/.rvm/gems/ruby-1.8.7-p334@rails2/gems/cucumber-0.10.0/bin/cucumber"  --profile default
Using the default profile...
 [FSTR] Using Red Five FileStorage version 0.1
Missing these required gems:
  cucumber-rails  >= 0.3.2
  rspec-rails  >= 1.3.2

You're running:
  ruby 1.8.7.334 at /Users/chuckhoffman/.rvm/rubies/ruby-1.8.7-p334/bin/ruby
  rubygems 1.6.2 at /Users/chuckhoffman/.rvm/gems/ruby-1.8.7-p334@rails2, /Users/chuckhoffman/.rvm/gems/ruby-1.8.7-p334@global

Run `rake gems:install` to install the missing gems.
rake aborted!
Command failed with status (1): [/Users/chuckhoffman/.rvm/rubies/ruby-1.8.7...]

(See full trace by running task with --trace)
chuckhoffman@Lucky-Charm:~/projects/siteman/current(rspec)$ gem list cucumber-rails

*** LOCAL GEMS ***

cucumber-rails (0.3.2)
chuckhoffman@Lucky-Charm:~/projects/siteman/current(rspec)$ gem list rspec-rails

*** LOCAL GEMS ***

rspec-rails (1.3.3, 1.3.0)
chuckhoffman@Lucky-Charm:~/projects/siteman/current(rspec)$ ls vendor/gems
ls: vendor/gems: No such file or directory

如您所见,gem列表报告了rake黄瓜告诉我的确切版本,而我的供应商中没有gem。 我还在新生成的新Rails 2.3.11应用程序中尝试过,结果相同。 那有什么呢?

首先,您似乎正在运行旧版本的RVM,因此更新可能会有所帮助。 其次,似乎您有一个rails2 gemset,如果您要安装到一个gemset,但是您的应用程序正在使用另一gemset,则可能会导致gem不匹配。 最后,您肯定应该使用Bundler在应用程序中管理gem,因为它解决了许多这类问题。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM