Forum: Ruby on Rails rename app>controller subfolder crashes app

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.
James W. (Guest)
on 2006-03-27 13:07
Help,

I changed a folder name in my app>controller from admin to company and
now I get a company is not a class error.

I do not have any custom routes set and have changed all references to
admin, no joy.

Does ruby / rails have a cache of the names?
Alex Y. (Guest)
on 2006-03-27 13:23
(Received via mailing list)
James W. wrote:
> Help,
>
> I changed a folder name in my app>controller from admin to company and
> now I get a company is not a class error.
>
> I do not have any custom routes set and have changed all references to
> admin, no joy.
>
> Does ruby / rails have a cache of the names?
Kinda.

First things first: have you restarted the web server?
James W. (Guest)
on 2006-03-27 13:34
Alex Y. wrote:
> James W. wrote:
>> Help,
>>
>> I changed a folder name in my app>controller from admin to company and
>> now I get a company is not a class error.
>>
>> I do not have any custom routes set and have changed all references to
>> admin, no joy.
>>
>> Does ruby / rails have a cache of the names?
> Kinda.
>
> First things first: have you restarted the web server?

Yes restarted, i'm running webrick on windows in dev mode.
Alex Y. (Guest)
on 2006-03-27 13:39
(Received via mailing list)
James W. wrote:
>>> Does ruby / rails have a cache of the names?
>> Kinda.
>>
>> First things first: have you restarted the web server?
>
> Yes restarted, i'm running webrick on windows in dev mode.
Where's the error being thrown from?  What's the full error?
James W. (Guest)
on 2006-03-27 13:42
Alex Y. wrote:
> James W. wrote:
>>>> Does ruby / rails have a cache of the names?
>>> Kinda.
>>>
>>> First things first: have you restarted the web server?
>>
>> Yes restarted, i'm running webrick on windows in dev mode.
> Where's the error being thrown from?  What's the full error?

The error on the page is:

 TypeError in <controller not set>#<action not set>

Company is not a class

RAILS_ROOT: ./script/../config/..

When I look at the full trace I get:

This error occured while loading the following files:
   ./script/../config/../app/controllers/company/accounts_controller.rb
   ./script/../config/../app/controllers/company/base_controller.rb
   login_system_employee.rb
   employee.rb
   company.rb
Alex Y. (Guest)
on 2006-03-27 13:48
(Received via mailing list)
James W. wrote:
> This error occured while loading the following files:
>    ./script/../config/../app/controllers/company/accounts_controller.rb

I don't suppose there were any line numbers mentioned?  What does
accounts_controller.rb look like?

What URL are you trying to access that triggers this?
James W. (Guest)
on 2006-03-27 13:57
Alex Y. wrote:
> James W. wrote:
>> This error occured while loading the following files:
>>    ./script/../config/../app/controllers/company/accounts_controller.rb
>
> I don't suppose there were any line numbers mentioned?  What does
> accounts_controller.rb look like?
>
> What URL are you trying to access that triggers this?

No line numbers are mentioned. I have run powerGrep to find all
instances of Admin in the entire project and replaced them with Company.
Still no joy.

I think that once you create a controller sub folder you are stuck with
that, it cannot be changed.

the URL i'm trying is: http://localhost:3000/company/accounts/login
Al the views have been changed & tests still not working.
Alex Y. (Guest)
on 2006-03-27 14:07
(Received via mailing list)
James W. wrote:
> the URL i'm trying is: http://localhost:3000/company/accounts/login
> Al the views have been changed & tests still not working.
Just a hunch:  try http://localhost:3000/company/accounts/login/ and see
if that works.
James W. (Guest)
on 2006-03-27 14:17
Alex Y. wrote:
> James W. wrote:
>> the URL i'm trying is: http://localhost:3000/company/accounts/login
>> Al the views have been changed & tests still not working.
> Just a hunch:  try http://localhost:3000/company/accounts/login/ and see
> if that works.

No joy there. Thanks for your help. I think this is one for the lessons
learnt folder.

Result: still not resolved.
Mats L. (Guest)
on 2006-03-27 14:33
(Received via mailing list)
_______________________________________________
Rails mailing list
removed_email_address@domain.invalid
http://lists.rubyonrails.org/mailman/listinfo/rails
This topic is locked and can not be replied to.