简体   繁体   中英

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

I've run across two very similar questions but the answers there apparently don't apply for my issue so I conclude I am getting the same error, but for different reasons.

Basically, I have rspec-rails and cucumber-rails installed, but I can't seem to convince "rake cucumber" of this.

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

As you can see, gem list reports the exact versions rake cucumber tells me are missing, and I have no gems in vendor. I've also tried it in a newly generated fresh Rails 2.3.11 app, with the same results. So what gives?

First, it looks like you're running an old version of RVM, updating may help. Second, it appears you have a rails2 gemset, which may be causing some gem mismatches if you're installing to one gemset but your application is using another. Last, you should definitely be using Bundler for managing gems in your application since it solves a lot of these types of problems.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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