$ gem search --local | grep cucumber
cucumber (0.4.4)
$ gem list | grep cucumber
cucumber (0.4.4)
$ gem uninstall cucumber
ERROR: While executing gem ... (Gem::InstallError)
Unknown gem cucumber >= 0
$ sudo gem uninstall cucumber
ERROR: While executing gem ... (Gem::InstallError)
Unknown gem cucumber >= 0
Odd..
If I install the latest gem of cucumber that works:
$sudo gem install cucumber
(::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::)
(::)
(::) U P G R A D I N G (::)
Thank you for installing cucumber-0.5.1.
Please be sure to read http://wiki.github.com/aslakhellesoy/cucumber/upgrading
for important information about this release. Happy cuking!
(::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::)
(::)
Successfully installed cucumber-0.5.1
1 gem installed
..... but upon running cucumber, I get:
$ cucumber
Using the default profile...
can't activate cucumber (= 0.4.4, runtime), already activated
cucumber-0.5.1 (Gem::Exception)
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
1.8/rubygems.rb:149:in `activate'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
1.8/rubygems/custom_require.rb:35:in `polyglot_original_require'
/Users/smcpherson/.gem/ruby/1.8/gems/polyglot-0.2.9/lib/polyglot.rb:
70:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:
155:in `require'
./features/support/env.rb:5
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
1.8/rubygems/custom_require.rb:31:in `polyglot_original_require'
/Users/smcpherson/.gem/ruby/1.8/gems/polyglot-0.2.9/lib/polyglot.rb:
70:in `require'
/Library/Ruby/Gems/1.8/gems/cucumber-0.5.1/bin/../lib/cucumber/
rb_support/rb_language.rb:124:in `load_code_file'
/Library/Ruby/Gems/1.8/gems/cucumber-0.5.1/bin/../lib/cucumber/
step_mother.rb:84:in `load_code_file'
/Library/Ruby/Gems/1.8/gems/cucumber-0.5.1/bin/../lib/cucumber/
step_mother.rb:76:in `load_code_files'
/Library/Ruby/Gems/1.8/gems/cucumber-0.5.1/bin/../lib/cucumber/
step_mother.rb:75:in `each'
/Library/Ruby/Gems/1.8/gems/cucumber-0.5.1/bin/../lib/cucumber/
step_mother.rb:75:in `load_code_files'
/Library/Ruby/Gems/1.8/gems/cucumber-0.5.1/bin/../lib/cucumber/cli/
main.rb:51:in `execute!'
/Library/Ruby/Gems/1.8/gems/cucumber-0.5.1/bin/../lib/cucumber/cli/
main.rb:23:in `execute'
/Library/Ruby/Gems/1.8/gems/cucumber-0.5.1/bin/cucumber:8
/usr/bin/cucumber:19:in `load'
/usr/bin/cucumber:19
This is a fresh system & I want to make sure I have a good cucumber
install.
.... any ideas on how to clean the slate? I must be missing something
here....
Can you try 'cucumber --version' here instead?
Also can you try:
$irb
>> require 'rubygems'
>> require 'cucumber'
>> Cucumber::VERSION
and see what that outputs.
> --
>
> You received this message because you are subscribed to the Google
> Groups "Cukes" group.
> To post to this group, send email to cu...@googlegroups.com.
> To unsubscribe from this group, send email to cukes+un...@googlegroups.com
> .
> For more options, visit this group at http://groups.google.com/group/cukes?hl=en
> .
>
>
cheers,
Matt
$ cucumber --version
0.5.1
Odd, right? I want to clear my cucumber slate on this system but can't
seem to get this 0.4.4 off.... Searching my app for reference to
0.4.4, I only see mentions of webrat >= 0.4.4
-Shannon
>> require 'rubygems'
=> false
>> require 'cucumber'
=> true
>> Cucumber::VERSION
=> "0.5.1"
-Shannon
> >> Please be sure to readhttp://wiki.github.com/aslakhellesoy/cucumber/upgrading
> >> For more options, visit this group athttp://groups.google.com/group/cukes?hl=en
> Sure. When I try that I get:
>
> $ cucumber --version
> 0.5.1
>
> Odd, right? I want to clear my cucumber slate on this system but can't
> seem to get this 0.4.4 off.... Searching my app for reference to
> 0.4.4, I only see mentions of webrat >= 0.4.4
>
> -Shannon
So it looks like something in is trying to require the older version
of cucumber - that's what the "can't activate cucumber (= 0.4.4,
runtime) already activated cucumber-0.5.1 (Gem::Exception)" means.
That seems odd to me, even given that your rubygems has obviously gone
a little haywire.
Two things:
(1) What is at line 5 in features/support/env.rb ?
(2) Can you try creating a fresh rails app (now that you have 0.5.1
installed), running script/generate cucumber, and see what happens then?
Oh a third thing too:
(3) What does gem --version say? If it's less than 1.3.5, please run
'sudo gem update --system'. That *might* help clear up the problem
with the older version that won't un-install.
Thanks for the help so far. So glad you are helping me on this :)
Lines 5 and 6 of my env.rb are:
require 'cucumber/rails/world'
require 'cucumber/formatter/unicode'
If I create a new app then run script/generate cucumber I get:
rails test-new-app cucumber
...
cd test-new-app
script/generate cucumber
Couldn't find 'cucumber' generator
-Shannon
> >>> Please be sure to readhttp://wiki.github.com/aslakhellesoy/cucumber/upgrading
> >>> For more options, visit this group athttp://groups.google.com/group/cukes?hl=en
> >>> .
>
> >> cheers,
> >> Matt
>
> >>http://mattwynne.net
> >> +447974 430184
>
> >> --
>
> >> You received this message because you are subscribed to the Google
> >> Groups "Cukes" group.
> >> To post to this group, send email to cu...@googlegroups.com.
> >> To unsubscribe from this group, send email to cukes+un...@googlegroups.com
> >> .
> >> For more options, visit this group athttp://groups.google.com/group/cukes?hl=en
> >> .
>
> > --
>
> > You received this message because you are subscribed to the Google
> > Groups "Cukes" group.
> > To post to this group, send email to cu...@googlegroups.com.
> > To unsubscribe from this group, send email to cukes+un...@googlegroups.com
> > .
> > For more options, visit this group athttp://groups.google.com/group/cukes?hl=en
> Matt,
>
> Thanks for the help so far. So glad you are helping me on this :)
>
> Lines 5 and 6 of my env.rb are:
> require 'cucumber/rails/world'
> require 'cucumber/formatter/unicode'
>
> If I create a new app then run script/generate cucumber I get:
> rails test-new-app cucumber
> ...
> cd test-new-app
> script/generate cucumber
> Couldn't find 'cucumber' generator
Right.
sudo gem install cucumber-rails
I'll explain why in a minute
> For more options, visit this group at http://groups.google.com/group/cukes?hl=en
Then ran cucumber:
$ cucumber
Using the default profile...
can't activate cucumber (= 0.4.4, runtime), already activated
cucumber-0.5.1 (Gem::Exception)
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
1.8/rubygems.rb:149:in `activate'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
1.8/rubygems/custom_require.rb:35:in `polyglot_original_require'
/Users/smcpherson/.gem/ruby/1.8/gems/polyglot-0.2.9/lib/polyglot.rb:
70:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:
155:in `require'
./features/support/env.rb:5
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
1.8/rubygems/custom_require.rb:31:in `polyglot_original_require'
/Users/smcpherson/.gem/ruby/1.8/gems/polyglot-0.2.9/lib/polyglot.rb:
70:in `require'
/Library/Ruby/Gems/1.8/gems/cucumber-0.5.1/bin/../lib/cucumber/
rb_support/rb_language.rb:124:in `load_code_file'
/Library/Ruby/Gems/1.8/gems/cucumber-0.5.1/bin/../lib/cucumber/
step_mother.rb:84:in `load_code_file'
/Library/Ruby/Gems/1.8/gems/cucumber-0.5.1/bin/../lib/cucumber/
step_mother.rb:76:in `load_code_files'
/Library/Ruby/Gems/1.8/gems/cucumber-0.5.1/bin/../lib/cucumber/
step_mother.rb:75:in `each'
/Library/Ruby/Gems/1.8/gems/cucumber-0.5.1/bin/../lib/cucumber/
step_mother.rb:75:in `load_code_files'
/Library/Ruby/Gems/1.8/gems/cucumber-0.5.1/bin/../lib/cucumber/cli/
main.rb:51:in `execute!'
/Library/Ruby/Gems/1.8/gems/cucumber-0.5.1/bin/../lib/cucumber/cli/
main.rb:23:in `execute'
/Library/Ruby/Gems/1.8/gems/cucumber-0.5.1/bin/cucumber:8
/usr/bin/cucumber:19:in `load'
/usr/bin/cucumber:19
Humm.... keep the ideas coming.
-Shannon
Quick tip - try to post inline (as I'm doing) so that when other
people see these emails they can make sense of the history of the
conversation.
Did you read http://wiki.github.com/aslakhellesoy/cucumber/upgrading
(as prompted by the message that's displayed when the 0.5.1 gem is
installed)? It says:
> As of Cucumber 0.5.0 you should also install/upgrade the cucumber-
> rails gem. After doing that you must also run ruby script/generate
> cucumber. See cucumber-rails’ History.txt for details, especially
> the upgrading instructions that are described for the 0.2.0 release
> of cucumber-rails.
We've done the first step, so I think your problem is now that you
need to re-generate your features/support/env.rb
Before you do that, now you've got cucumber-rails installed, try
'script/generate cucumber' in a virgin rails app again, and compare
the env.rb file that generates with the one you have in your app - I
think your app is requiring some stuff it shouldn't be.
This would all be less confusing for you if the 0.4.4 gem had
uninstalled cleanly, but I think that's a rubygems issue. Did you try
my step (3) below?
> For more options, visit this group at http://groups.google.com/group/cukes?hl=en
I ran into this exact error message last week. And it took me forever
to figure out what was wrong.
> "can't activate cucumber (= 0.4.4, runtime)
> already activated cucumber-0.5.1 (Gem::Exception)"
For my code, it turned out that the file /support/version_check.rb was
the one causing me the problem.
Do you have that file? What happens when you delete it?
I see you already moved all custom logic out of /support/env.rb and
upgraded the support scripts: ./script/generate cucumber
If it can help you further, there are the files that I had to modify
in the commit where I upgraded Cucumber.
I hope this will help you.
/Jesper Rønn-Jensen
http://justaddwater.dk/
commit 194976a3fd55cc62efa9d302b4ed093f347ad9f1
Author: Jesper Rønn-Jensen
upgraded cucumber to version 0.5.1.
Had to delete /features/support/version_check.rb which stopped
cucumber during startup
But I found out after I deleted and reinstalled all gems:
$ sudo gem uninstall cucumber polyglot rspec-rails cucumber-rails
rspec jeweler
$ ^uninstall^install
app/models/expense_report.rb | 14 ++
config/cucumber.yml | 7 +
config/database.yml | 3 +
config/environments/cucumber.rb | 21 ++-
cucumber.yml | 5 -
features/step_definitions/web_steps.rb | 258 +++++++++++++++++++++
++++++++
features/step_definitions/webrat_steps.rb | 184 --------------------
features/support/env.rb | 65 +++++---
lib/tasks/cucumber.rake | 90 ++++-------
script/cucumber | 20 ++-
:)
> Did you readhttp://wiki.github.com/aslakhellesoy/cucumber/upgrading
That was it. I upgraded my gem version to 1.3.5 and was then able to
remove my problematic install of 0.4.4. I then was able to go about my
cuke lovin' business. Thanks Matt!
> ...
>
> read more »
:)
> Did you readhttp://wiki.github.com/aslakhellesoy/cucumber/upgrading
That was it. I upgraded my gem version to 1.3.5 and was then able to
remove my problematic install of 0.4.4. I then was able to go about my
cuke lovin' business. Thanks Matt!
> >>>>> On Dec 21, 2009, at 12:36 AM, Matt Wynne wrote:
> ...
>
> read more »