# Uninitialized constant ApplicationController

**URL:** <https://www.ruby-forum.com/t/uninitialized-constant-applicationcontroller/100521>\
**Category:** Rails\
**Created:** [July 29, 2006, 7:32pm UTC](https://www.ruby-forum.com/t/uninitialized-constant-applicationcontroller/100521 "2006-07-29T19:32:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sutch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/13edae/32.png) [@sutch](https://www.ruby-forum.com/u/sutch)\
**Post date:** [July 29, 2006, 7:32pm UTC](https://www.ruby-forum.com/t/uninitialized-constant-applicationcontroller/100521/1 "2006-07-29T19:32:34Z")

</div>

Hey,

I am getting a weird error that doesn’t give much helpful debug output  
because the application controller can not be found. The actual error  
output actually shows up in the webrick server, i’m trying right now  
wether this could be because of my computer configuration but i don’t  
think so because it was working yesterday and i must have changed  
something that broke it but i have absolutely no clue what it is.

thanks,  
dennis

* * *

#\<NameError: uninitialized constant ApplicationController\>  
["/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active\_support/dependencies.rb:123:in  
`const_missing'", "/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:131:in`const\_missing’",  
“script/…/config/…/app/controllers/content\_controller.rb:6”,  
“/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active\_support/dependencies.rb:140:in  
`load'", "/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:56:in`require\_or\_load’”,  
“/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active\_support/dependencies.rb:30:in  
`depend_on'", "/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:85:in`require\_dependency’”,  
“/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active\_support/dependencies.rb:98:in  
`const_missing'", "/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:131:in`const\_missing’”,  
“/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active\_support/inflector.rb:161:in  
`constantize'", "/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/core_ext/string/inflections.rb:59:in`constantize’”,  
“/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active\_support/core\_ext/module/introspection.rb:6:in  
`parent'", "/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/core_ext/class/removal.rb:16:in`remove\_class’”,  
“/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active\_support/core\_ext/class/removal.rb:11:in  
`remove_class'", "/usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/dispatcher.rb:55:in`reset\_application!’”,  
“/usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/dispatcher.rb:74:in  
`reset_after_dispatch'", "/usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/dispatcher.rb:46:in`dispatch’”,  
“/usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick\_server.rb:115:in  
`handle_dispatch'", "/usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick_server.rb:81:in`service’”,  
“/usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'", "/usr/lib/ruby/1.8/webrick/httpserver.rb:65:in`run’”,  
“/usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'", "/usr/lib/ruby/1.8/webrick/server.rb:162:in`start\_thread’”,  
“/usr/lib/ruby/1.8/webrick/server.rb:95:in `start'", "/usr/lib/ruby/1.8/webrick/server.rb:92:in`start’”,  
“/usr/lib/ruby/1.8/webrick/server.rb:23:in `start'", "/usr/lib/ruby/1.8/webrick/server.rb:82:in`start’”,  
“/usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/webrick\_server.rb:67:in  
`dispatch'", "/usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/commands/servers/webrick.rb:59", "/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in`require’”,  
“/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active\_support/dependencies.rb:147:in  
`require'", "/usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/commands/server.rb:30", "/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in`require’”,  
"/usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active\_support/dependencies.rb:147:in  
`require'", "script/server:3"] [2006-07-29 00:59:04] ERROR`/content/userContents’ not found.  
127.0.0.1 - - [29/Jul/2006:00:59:03 PDT] “GET /content/userContents  
HTTP/1.1” 404 290

- -\> /content/userContents

---

<div class="post-metadata">

**Author:** ![sutch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/13edae/32.png) [@sutch](https://www.ruby-forum.com/u/sutch)\
**Post date:** [December 9, 2008, 8:08am UTC](https://www.ruby-forum.com/t/uninitialized-constant-applicationcontroller/100521/2 "2008-12-09T08:08:48Z")

</div>

Dennis Schaaf wrote:

> Hey,
> 
> I am getting a weird error that doesn’t give much helpful debug output  
> because the application controller can not be found. The actual error  
> output actually shows up in the webrick server, i’m trying right now  
> wether this could be because of my computer configuration but i don’t  
> think so because it was working yesterday and i must have changed  
> something that broke it but i have absolutely no clue what it is.
> 
> thanks,  
> dennis
> 
> * * *

I am getting the same error. I have freezed rails to 2.2.2. in the  
dev-log it looks like the application.rb cannot be found anymore after a  
db:migrate. If i “require app/controllers/application.rb” from the  
controller, then it is found. So the file is there. But then it looks  
like the stylesheets cannot be found.

---

<div class="post-metadata">

**Author:** ![sutch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/13edae/32.png) [@sutch](https://www.ruby-forum.com/u/sutch)\
**Post date:** [December 9, 2008, 8:16am UTC](https://www.ruby-forum.com/t/uninitialized-constant-applicationcontroller/100521/3 "2008-12-09T08:16:12Z")

</div>

Rasmus R. wrote:

> Dennis Schaaf wrote:
> 
> > Hey,
> > 
> > I am getting a weird error that doesn’t give much helpful debug output  
> > because the application controller can not be found. The actual error  
> > output actually shows up in the webrick server, i’m trying right now  
> > wether this could be because of my computer configuration but i don’t  
> > think so because it was working yesterday and i must have changed  
> > something that broke it but i have absolutely no clue what it is.
> > 
> > thanks,  
> > dennis
> > 
> > * * *
> 
> I am getting the same error. I have freezed rails to 2.2.2. in the  
> dev-log it looks like the application.rb cannot be found anymore after a  
> db:migrate. If i “require app/controllers/application.rb” from the  
> controller, then it is found. So the file is there. But then it looks  
> like the stylesheets cannot be found.

sorry! i refreshed the page and now the styles are there 🙂

oh! I just now tried removing the “require” line and it still finds  
application.rb. The error is gone! Haha, I’m starting to sound like  
David Heinemeier H…

What caused this? Perhaps it’s working again beause I did “Clear Private  
Data” in firefox?
