Big Error, need help fast :(

I was trying to clean up my rails application, and now I’m getting
this error in my development log. No page in my site will come up when
I start up the web server. Anyone know how to fix this??

==== Development Log

no such file to load – application.rb

c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/
dependencies.rb:203:in `load_without_new_constant_marking’

c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/
dependencies.rb:203:in `load_file’

c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/
dependencies.rb:342:in `new_constants_in’

c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/
dependencies.rb:202:in `load_file’

c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/
dependencies.rb:94:in `require_or_load’

c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/
dependencies.rb:60:in `depend_on’

c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/
dependencies.rb:442:in `require_dependency’

c:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:110:in
`prepare_application’

c:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:39:in
`dispatch’

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

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

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

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

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

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

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

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

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

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

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

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

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

c:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/
webrick.rb:59

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

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

c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/
dependencies.rb:495:in `require’

c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/
dependencies.rb:342:in `new_constants_in’

c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/
dependencies.rb:495:in `require’

c:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39

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

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

script/server:3

Well, it says it can’t load your application.rb file…
app/controllers/application.rb … is that file there?

I don’t have that file, but I don’t know why its looking for that file
at all… Is there a way to get that reference out of there?

No… you NEED that file… that’s really important

Put it back

I ran “ruby script/destroy controller application” and it removed some
files, but I’m getting that same error… grrr

Brian H. wrote:

No… you NEED that file… that’s really important

Put it back

Um, yes. What this guys says.

application.rb hold the ApplicationController class. Every single
controller in your rails app inherits from ApplicationController.
Without it, your controllers cant find their parent class and crash
without having the invisble functionality they should. Even if that
file has no methods in it, it has to be there.

At minumum, put this in it:

class ApplicationController < ActionController::Base
end

oh thanks… I had created a view called “Application” at some point,
and I was wondering if I had accidentally created some controller
called that. I didn’t realize that was created when the rails
application was originally made. Thank you so much it works now…

@Alex:
Beat me to it while I was typing :slight_smile:

Thanks a lot guys…

On Apr 10, 5:01 pm, Alex W. [email protected]