Forum: RSpec uninitialized constant ActionController running Cucumber features in Aptana/RadRails IDE

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
A66a4d323674aba4a904ceeff3f34658?d=identicon&s=25 WJSimacek (Guest)
on 2009-04-27 20:30
(Received via mailing list)
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?
0be0e4aa42aacd9a8a95c792de273ca7?d=identicon&s=25 Aslak Hellesøy (aslakhellesoy)
on 2009-04-27 23:54
(Received via mailing list)
>  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: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


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

Aslak
A66a4d323674aba4a904ceeff3f34658?d=identicon&s=25 WJSimacek (Guest)
on 2009-04-28 19:11
(Received via mailing list)
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
A66a4d323674aba4a904ceeff3f34658?d=identicon&s=25 WJSimacek (Guest)
on 2009-04-29 12:56
(Received via mailing list)
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-driv...

Thanks all again for the help,

Wayne
This topic is locked and can not be replied to.