Werid error, please help

Hi all,

I updated to Rails 1.2.1. However, when I tried to access the URL
http://localhost:3000/
i get this Application Error
Change this error message for exceptions thrown outside of an action
(like in Dispatcher setups or broken Ruby code) in public/500.html

I removed the default index.html and route it to Account controller.
If you read the log below, it seems that the AccountController is not
defined, but it is there.

If anyone can help, i would greatly appreciate it.

Thank you

here is the log:
Expected ./script/…/config/…/app/controllers/account_controller.rb to
define AccountController

D:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:250:in
`load_missing_constant’

D:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:453:in
`const_missing’

D:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:465:in
`const_missing’

D:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/inflector.rb:251:in
`constantize’

D:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/core_ext/string/inflections.rb:148:in
`constantize’

D:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.1/lib/action_controller/routing.rb:1258:in
`recognize’

D:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.1/lib/dispatcher.rb:40:in
`dispatch’

D:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.1/lib/webrick_server.rb:113:in
`handle_dispatch’

D:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.1/lib/webrick_server.rb:79:in
`service’

D:/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in `service’

D:/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in `run’

D:/ruby/lib/ruby/1.8/webrick/server.rb:173:in `start_thread’

D:/ruby/lib/ruby/1.8/webrick/server.rb:162:in `start’

D:/ruby/lib/ruby/1.8/webrick/server.rb:162:in `start_thread’

D:/ruby/lib/ruby/1.8/webrick/server.rb:95:in `start’

D:/ruby/lib/ruby/1.8/webrick/server.rb:92:in `each’

D:/ruby/lib/ruby/1.8/webrick/server.rb:92:in `start’

D:/ruby/lib/ruby/1.8/webrick/server.rb:23:in `start’

D:/ruby/lib/ruby/1.8/webrick/server.rb:82:in `start’

D:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.1/lib/webrick_server.rb:63:in
`dispatch’

D:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.1/lib/commands/servers/webrick.rb:59

D:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require’

D:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require’

D:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:496:in
`require’

D:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:343:in
`new_constants_in’

D:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:496:in
`require’

D:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.1/lib/commands/server.rb:39

D:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require’

D:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require’

D:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:496:in
`require’

D:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:343:in
`new_constants_in’

D:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:496:in
`require’

./script/server:3

-e:4:in `load’

-e:4

Hi,

is there a way to manually define the names of the resources
that map.resources sets up for REST support?

The thing is that my controller is named in german, so the
pluralization rules won’t work for me. I need to tell him
explicitly that the plural name should be “Kindergaerten”,
while a member is a “Kindergarten” (not actually a resource
name), so i get POST url /kindergaerten/, GET /kindergarten/1
and so on…

I already tried IRC and the API docs, but that did not help.

Thanks a lot in advance!

Greetings,
Christoph O.

Just figured this out. It isn’t because the AccountController isn’t
defined, it’s because the AccountController has some obsolete code in
it somewhere.

On Jan 19, 7:46 am, “[email protected]

I’ve seen other people have this error too, over at #rubyonrails. Let’s
hope it’s a bug =/

Have you tried adding Kindergarten -> Kindergaerten to the Inflector
loop in
config/environment.rb?

RSL

What was the obsolete code?

I’m getting the same errors.

Thanks,

Andrew

anyone with the knowledge to resolve this??

i’m thinking of rebuilding the project, and install each plugin one by
one and see what the problem is, if then still can’t resolve this
issue, i will have to roll back to v 1.1.6

please speak up if you know the answer. thank you very much

I fixed my problems by adding

module Engines
CONFIG = {:edge => true}
end

to the top of my environment.rb file. seems like the problems was
related to the Rails Engines plugin.

Thanks Andrew,
That fixed my problem. I thought the problem was Rails Engines plugin.
But I didn’t think it was necessary to add those 3 lines since rails
1.2.1 is a official release instead of an edge version. Anyone knows
why we need to add the lines?

Please share your knowledge. Thank you

Hi,

thanks, that worked very well! I didn’t use the inflector before
so I did not know this was possible.

Greetings,
Christoph

Russell N. schrieb: