views:

32

answers:

1

In rails console I get the following:

>> UsersController

LoadError: Expected /../app/controllers/admin/users_controller.rb to define UsersController

I'm using Rails 3.0.0.rc. Exact same code works fine for 3.0.0.beta3 and 3.0.0.beta4 BTW.

In short the controllers look like:

app/controllers/admin/users_controller.rb

class Admin::UsersController < AdminController
...
end

app/controllers/admin_controller.rb

class AdminController < ApplicationController
...
end

app/controllers/users_controller.rb

class UsersController < ApplicationController
...
end

I've used this Admin stuff many time (haven't we all :) ).. but never got this weird issue. All files are loaded and this should be straight forward thing. Guess I'm doing smth stupid somewhere :).

Many thanks!

A: 

Just notice your...

app/controllers/admin/users_contoller.rb

controller is spelled wrong, missing r. I'm guessing that might have been a typo in your post, but who knows, it's worth to double check because that's usually what the error means.

sai
Just typo in post indeed.. but thanks anyway! :)
Mik Nijhuis