Note that there are some explanatory texts on larger screens.

plurals
  1. POCustom dynamic error pages in Ruby on Rails not working
    primarykey
    data
    text
    <p>I'm trying to implement custom dynamic error pages following this post: <a href="http://www.perfectline.co.uk/blog/custom-dynamic-error-pages-in-ruby-on-rails" rel="nofollow noreferrer">http://www.perfectline.co.uk/blog/custom-dynamic-error-pages-in-ruby-on-rails</a></p> <p>I did exactly what the blog post says. I included config.action_controller.consider_all_requests_local = false in my environment.rb. But is not working.</p> <p>My browser shows:</p> <pre><code>Routing Error No route matches "/555" with {:method=&gt;:get} </code></pre> <p>So, it looks like the rescues are not fired. I get the following in my log file:</p> <pre><code>ActionController::RoutingError (No route matches "/555" with {:method=&gt;:get}): Rendering rescues/layout (not_found) </code></pre> <p>Is there some routing interfering with the code? I'm not sure what to look for. I'm running rails 2.3.5.</p> <p>Here is the routes.rb file:</p> <pre><code>ActionController::Routing::Routes.draw do |map| # routing van property-url map.connect 'buy/:property_type_plural/:province/:city/:address/:house_number', :controller =&gt; 'properties' , :action =&gt; 'show', :id =&gt; 'whatever' map.myimmonatie 'myimmonatie' , :controller =&gt; 'myimmonatie/properties', :action =&gt; 'index' map.login "login", :controller =&gt; "user_sessions", :action =&gt; "create", :conditions =&gt; {:method =&gt; :post} map.login "login", :controller =&gt; "user_sessions", :action =&gt; "new" map.logout "logout", :controller =&gt; "user_sessions", :action =&gt; "destroy" map.buy "buy", :controller =&gt; 'buy' map.sell "sell", :controller =&gt; 'sell' map.home "home", :controller =&gt; 'home' map.disclaimer "disclaimer", :controller =&gt; 'disclaimer' map.sign_up "sign_up", :controller =&gt; 'users', :action =&gt; :new map.contact "contact", :controller =&gt; 'contact' map.resources :user_sessions map.resources :contact map.resources :password_resets map.resources :messages map.resources :users, :only =&gt; [:index,:new,:create,:activate,:edit,:profile,:password] map.resources :images map.resources :activation , :only =&gt; [:new,:resend] map.resources :email map.resources :properties, :except =&gt; [:index,:destroy] map.namespace :admin do |admin| admin.resources :users admin.resources :properties admin.resources :order_items, :as =&gt; :orders admin.resources :blog_posts, :as =&gt; :blog end map.connect 'myimmonatie/:action' , :controller =&gt; 'users', :id =&gt; 'current', :requirements =&gt; {:action =&gt; /(profile)|(password)|(email)/} map.namespace :myimmonatie do |myimmonatie| myimmonatie.resources :messages, :controller =&gt; 'messages' myimmonatie.resources :password, :as =&gt; "password", :controller =&gt; 'users', :action =&gt; 'password' myimmonatie.resources :properties , :controller =&gt; 'properties' myimmonatie.resources :orders , :only =&gt; [:index,:show,:create,:new] end map.root :controller =&gt; "home" map.connect ':controller/:action' map.connect ':controller/:action/:id' map.connect ':controller/:action/:id.:format' end ActionController::Routing::Translator.translate_from_file('config','i18n-routes.yml') </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload