I got it working by simplifying the code and isolating the problem. The error happens when I use my regular layout application.html.erb. If I remove all the class variables used throughout the layout, it works fine. My goal was to use my standard layout (navigation, etc.) with the error message. Why would this error occur? Thanks.
On Jan 22, 10:06 am, Andrew Timberlake <[email protected]> wrote: > On Thu, Jan 22, 2009 at 4:11 PM, Dowker <[email protected]> wrote: > > > Thanks Andrew. I tried your suggestion and changed the render to: > > > render :text => 'Page Not Found.', :layout => 'application', :status > > => :not_found > > > I'm still getting a "500 Internal Server Error" error. Here's the > > console output which may help: > > > Processing ApplicationController#index (for 127.0.0.1 at 2009-01-22 > > 09:05:10) [GET] > > Rendering template within layouts/application > > /!\ FAILSAFE /!\ Thu Jan 22 09:05:10 -0500 2009 > > Status: 500 Internal Server Error > > No route matches "/dd" with {:method=>:get} > > /usr/local/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/actionpack-2.2.2/ > > lib/action_controller/routing/recognition_optimisation.rb:66:in > > `recognize_path' > > /usr/local/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/actionpack-2.2.2/ > > lib/action_controller/routing/route_set.rb:386:in `recognize' > > /usr/local/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/actionpack-2.2.2/ > > lib/action_controller/dispatcher.rb:182:in `handle_request' > > /usr/local/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/actionpack-2.2.2/ > > lib/action_controller/dispatcher.rb:110:in `dispatch_unlocked' > > /usr/local/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/actionpack-2.2.2/ > > lib/action_controller/dispatcher.rb:123:in `dispatch' > > /usr/local/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/actionpack-2.2.2/ > > lib/action_controller/dispatcher.rb:122:in `synchronize' > > /usr/local/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/actionpack-2.2.2/ > > lib/action_controller/dispatcher.rb:122:in `dispatch' > > /usr/local/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/actionpack-2.2.2/ > > lib/action_controller/dispatcher.rb:132:in `dispatch_cgi' > > /usr/local/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/actionpack-2.2.2/ > > lib/action_controller/dispatcher.rb:39:in `dispatch' > > /usr/local/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/mongrel-1.1.5/ > > bin/../lib/mongrel/rails.rb:76:in `process' > > /usr/local/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/mongrel-1.1.5/ > > bin/../lib/mongrel/rails.rb:74:in `synchronize' > > /usr/local/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/mongrel-1.1.5/ > > bin/../lib/mongrel/rails.rb:74:in `process' > > /usr/local/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/ > > mongrel.rb:159:in `process_client' > > /usr/local/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/ > > mongrel.rb:158:in `each' > > /usr/local/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/ > > mongrel.rb:158:in `process_client' > > /usr/local/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/ > > mongrel.rb:285:in `run' > > /usr/local/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/ > > mongrel.rb:285:in `initialize' > > /usr/local/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/ > > mongrel.rb:285:in `new' > > /usr/local/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/ > > mongrel.rb:285:in `run' > > /usr/local/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/ > > mongrel.rb:268:in `initialize' > > /usr/local/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/ > > mongrel.rb:268:in `new' > > /usr/local/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/ > > mongrel.rb:268:in `run' > > /usr/local/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/ > > mongrel/configurator.rb:282:in `run' > > /usr/local/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/ > > mongrel/configurator.rb:281:in `each' > > /usr/local/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/ > > mongrel/configurator.rb:281:in `run' > > /usr/local/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/ > > mongrel_rails:128:in `run' > > /usr/local/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/ > > mongrel/command.rb:212:in `run' > > /usr/local/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/ > > mongrel_rails:281 > > /usr/local/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/ > > activesupport-2.2.2/lib/active_support/dependencies.rb:142:in > > `load_without_new_constant_marking' > > /usr/local/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/ > > activesupport-2.2.2/lib/active_support/dependencies.rb:142:in `load' > > /usr/local/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/ > > activesupport-2.2.2/lib/active_support/dependencies.rb:521:in > > `new_constants_in' > > /usr/local/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/ > > activesupport-2.2.2/lib/active_support/dependencies.rb:142:in `load' > > /usr/local/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/ > > commands/servers/mongrel.rb:64 > > /usr/local/ruby-1.8.7-p72/lib/ruby/site_ruby/1.8/rubygems/ > > custom_require.rb:31:in `gem_original_require' > > /usr/local/ruby-1.8.7-p72/lib/ruby/site_ruby/1.8/rubygems/ > > custom_require.rb:31:in `require' > > /usr/local/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/ > > activesupport-2.2.2/lib/active_support/dependencies.rb:153:in > > `require' > > /usr/local/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/ > > activesupport-2.2.2/lib/active_support/dependencies.rb:521:in > > `new_constants_in' > > /usr/local/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/ > > activesupport-2.2.2/lib/active_support/dependencies.rb:153:in > > `require' > > /usr/local/ruby-1.8.7-p72/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/ > > commands/server.rb:49 > > /usr/local/ruby-1.8.7-p72/lib/ruby/site_ruby/1.8/rubygems/ > > custom_require.rb:31:in `gem_original_require' > > /usr/local/ruby-1.8.7-p72/lib/ruby/site_ruby/1.8/rubygems/ > > custom_require.rb:31:in `require' > > ./script/server:3 > > > Thanks. > > Here's the code straight out of my application controller: > > rescue_from ActiveRecord::RecordNotFound, :with => :record_not_found > > private > def record_not_found > render :template => 'not_found', :layout => 'error', :status => > :not_found > end > > -- > Andrew > Timberlakehttp://ramblingsonrails.comhttp://www.linkedin.com/in/andrewtimberlake > > "I have never let my schooling interfere with my education" - Mark Twain --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

