[英]“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.