I’m just starting on BDD. I installed the gems for webrats and
cucumber.
I also ran the following in the Ruby shell:
rake gems:install RAILS_EN=test
script/generate cucumber
These commands seemed to create the expected features and lib folders
in my project.
I’m using the eclipse framework with Aptana and RadRails as my IDE.
However, when I run:
cucumber features -n
from the Ruby shell, I get the following error:
./app/controllers/application.rb:4: uninitialized constant
ActionController (NameError)
from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
gem_original_require' from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
polyglot_original_require’
from C:/ruby/lib/ruby/gems/1.8/gems/polyglot-0.2.5/lib/polyglot.rb:
54:in require' from C:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.3.0/bin/../lib/ cucumber/cli/main.rb:79:in
require_files’
from C:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.3.0/bin/…/lib/
cucumber/cli/main.rb:77:in each' from C:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.3.0/bin/../lib/ cucumber/cli/main.rb:77:in
require_files’
from C:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.3.0/bin/…/lib/
cucumber/cli/main.rb:34:in execute!' from C:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.3.0/bin/../lib/ cucumber/cli/main.rb:20:in
execute’
from C:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.3.0/bin/cucumber:6
from C:/ruby/bin/cucumber:19:in `load’
from C:/ruby/bin/cucumber:19
Any ideas on how I can initialize this constant ActionController or
where the real error is coming from? Do I have to do some additional
includes in some of my files?