views:

304

answers:

1

I have project on Rails (2.3.5). I add into environment.rb same sting:

config.gem "cucumber-rails",

run "rake gems:unpack:dependencies". Output of "rake gems":

  • [F] cucumber-rails
    • [F] cucumber >= 0.6.2
      • [F] term-ansicolor >= 1.0.4
      • [F] treetop >= 1.4.2
        • [F] polyglot >= 0.3.1
      • [F] polyglot >= 0.2.9
      • [F] builder >= 2.1.2
      • [F] diff-lcs >= 1.1.2
      • [F] json_pure >= 1.2.0

When I run "script/generate cucumber" I get Missing these required gems: cucumber-rails

Who can help me to fix this?

A: 

Try moving the config.gem statement from environment.rb to environments/test.rb

EDIT

Why does this work? I'm not sure, but my guess would be that the cucumber generator (script/generate cucumber) is expecting to run in the development environment, and not the test environment. When you declare config.gem in environment.rb, it applies to all environments. Maybe the generator gets confused when it finds cucumber-rails where it's not expected?

I'd go on, but my wrists are sore from all this hand-waving...

zetetic
Thanks, it's work. Can you explain this? What's a reason?
sev
See my edited answer
zetetic
Do you know how can I define language global for all features?
sev