Topic: cucumber generator not found!


So-- my story is, I had my app using restful authentication, and I just couldn't take it anymore..  I decided to switch to auth-logic...  So, I deleted all my restful_auth files, and then got a ton of weird errors having to do with dependencies for acts_as_state_machine....   It was complaining that this was in a dependencies file in my ~/.gem/, so I trashed that folder, and decided to start over..

I had previously installed all my gems not as root, so they were all in that ~/.gem folder--- so I I reinstalled rails as a gem, and then did sudo rake gems:install..  It went through all the stuff, and showed I had installed cucumber...

However, whenever I do anything (like script/server, etc) I get:
/Users/patrick/.gem/ruby/1.8/gems/actionpack-2.3.2/lib/action_controller/vendor/rack-1.0/rack.rb:17: warning: already initialized constant VERSION

And if I try to do script/generate cucumber, I get:
/Users/patrick/.gem/ruby/1.8/gems/actionpack-2.3.2/lib/action_controller/vendor/rack-1.0/rack.rb:17: warning: already initialized constant VERSION
Couldn't find 'cucumber' generator

I did rake gems

- (I) prawn
   - (I) prawn-core >= 0.7.1, < 0.8
   - (I) prawn-layout >= 0.7.1, < 0.8
   - (I) prawn-security >= 0.7.1, < 0.8
- (I) rspec-rails
   - (I) rspec >= 1.2.9
   - (I) rack >= 1.0.0
- (I) rspec
- (I) cucumber
   - (I) term-ansicolor >= 1.0.4
   - (I) treetop >= 1.4.2
      - (I) polyglot >= 0.2.5
   - (I) polyglot >= 0.2.9
   - (R) builder >= 2.1.2
   - (I) diff-lcs >= 1.1.2
   - (I) json_pure >= 1.2.0
- (I) webrat
   - (I) nokogiri >= 1.2.0
   - (I) rack >= 1.0
- (I) w3c_validators

I = Installed
F = Frozen
R = Framework (loaded before rails starts)

Cucumber is installed...

but if i do script/generate

Installed Generators
  Plugins (vendor/plugins): gateway, integration, paperclip
  Rubygems: integration_spec, rspec, rspec_controller, rspec_model, rspec_scaffold
  Builtin: controller, helper, integration_test, mailer, metal, migration, model, observer, performance_test, plugin, resource, scaffold, session_migration

Cucumber is not there...

I tried doing sudo gem uninstall cucumber, and then reinstalling it but the same thing happens...

Any suggestions?


Re: cucumber generator not found!

I just found the solution for this myself.

You need to also run:

sudo gem install cucumber-rails

There is a brief explanation of why on … 3f6b6d3db.

Apparently in a recent version of cucumber part of the project was split for some reason. :S