Uninitialized constant ActionController running Cucumber features in Aptana/RadRails IDE

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:inpolyglot_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:inrequire_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:inrequire_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:inexecute’
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?

I’m using the eclipse framework with Aptana and RadRails as my IDE.
from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
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:inexecute’
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

ActionController is part of Rails. It sounds like there is something
wrong
with your Rails installation.

Aslak

I uninstalled rails-2.3.1 and rails-2.3.2 and then
Successfully installed rails-2.3.2

==>Same error message

I think I’m going to try and lose the eclipse framework next. Just
another layer giving me a headache.

Thanks for your help,
Wayne

That did the trick. I blew out eclipse and reinstalled my Aptana
directly. Re-added my RadRails Plugin and gems Cucumber, RSpec, RSpec-
rails and WebRat. There was one clue I found that said when using
Cucumber with windows, I should insert the line 1 $KCODE=’ ’ into my
features/support/env.rb file. It’s a great into article at
http://blog.rubyyot.com/2009/01/chores-a-test-driven-website/

Thanks all again for the help,

Wayne