My toy of the day is cucumber, a very intriguing BDD framework for ruby (and rails). I had quickly looked at a few screencasts and decided to jump right in, and did this:
sudo gem install cucumber
and right away, did this in a freshly made rails app folder:
script/generate cucumberIt’s probably not surprising to those more versed in cucumber that I ended up with:
Couldn't find 'cucumber' generator
Turns out, after version 0.4.5 (i think?) you need an additional gem…
sudo gem install cucumber-rails
Dur… I wasted a good 20 minutes figuring out the (apparently) obvious.
As a side note, if you’re a TextMate fan like myself, this bundle is really neat when working on cucumber feature files.
Cheers!
{ 5 comments… read them below or add one }
First time with cucumber and I faced exactly the same problem. Thanks for sharing the solution
–
Maku
no problem! i know how annoying these little “gotchas” can be…
Very annoying! Thanks!
thanks for the tip. however – i’m trying to follow ryan bates’ railscast about cucumber.
but as soon as i define my step definition and run “cucumber features” i get “Anonymous modules have no name to be referenced by (ArgumentError).”
if i rvm to Ruby 1.8.7 and run the same command – i get the proper error.
Any ideas? I am running Ruby 1.9.1 with Rails 2.3.5 and have all the required gems installed.
i think i’ve seen this once quite a while ago — sorry i forget how i got around it. i believe it had something to do with additional libs i was including in my project — check your dependencies, and make sure they’re loading properly. try using the rails console, and accessing any plugins or add-ons in your project, to ensure they’re loaded. probably not much help, but there ya go!