views:

705

answers:

3

How can I de-activate the newer version of cucumber, or get this to work with the earlier version?

user$ rake features
(in /Users/user/Project)
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -I    "/Library/Ruby/Gems/1.8/gems/cucumber-0.6.1/lib:lib" "/Library/Ruby/Gems/1.8/gems/cucumber-   0.6.1/bin/cucumber" --format pretty
can't activate cucumber (= 0.4.4, runtime) for [], already activated cucumber-0.6.1 for [] (Gem::LoadError)
/Library/Ruby/Site/1.8/rubygems.rb:280:in `activate'
+3  A: 

I'd try removing 0.6.1 entirely and seeing if it will run with just 0.4.4 installed.

If not, you need to track down what is requiring 0.4.4 and change it to >= and see if that works.

Sarah Mei
I tried that, it gives me this:no such file to load -- cucumber/rails/world (MissingSourceFile)/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require'/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `polyglot_original_require'/Library/Ruby/Gems/1.8/gems/polyglot-0.2.9/lib/polyglot.rb:70:in `require'/Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:158:in `require'/Users/ericsorenson/RubyOnRails/qwantime/features/support/env.rb:4/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require'...
Eric the Red
After removing and reinstalling gems for what seemed like days, your advice was accurate. Hopefully Gem Bundler will help with this kind of thing in the future?
Eric the Red
A: 

There are some simple tweaks you can use so multiple versions of Cucumber play nice with each other:

http://gem-session.com/2010/04/how-to-use-multiple-versions-of-cucumber-in-parallel

Henning
A: 

A nice longer term solution is to use rvm, and gemsets. Once you install rvm this post is very handy indeed.

http://www.stjhimy.com/posts/4

Allansideas