# Default behavior on unrecognized route in development and production environment

**URL:** <https://www.ruby-forum.com/t/default-behavior-on-unrecognized-route-in-development-and-production-environment/142045>\
**Category:** Rails\
**Created:** [July 2, 2008, 9:51pm UTC](https://www.ruby-forum.com/t/default-behavior-on-unrecognized-route-in-development-and-production-environment/142045 "2008-07-02T21:51:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![waddilove](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/b5ac83/32.png) [@waddilove](https://www.ruby-forum.com/u/waddilove)\
**Post date:** [July 2, 2008, 9:51pm UTC](https://www.ruby-forum.com/t/default-behavior-on-unrecognized-route-in-development-and-production-environment/142045/1 "2008-07-02T21:51:01Z")

</div>

Hello,  
The default behavior for a new rails 2.1 with mongrel 1.1.5 for an  
unrecognized route in both a production and development environment is  
to generate a Routing Exception.

I was under the impression the default in production should be to  
render 404.html file found in the public directory. Please see my  
pastie at [http://pastie.org/226508](http://pastie.org/226508) for how I tested this. I also  
tested it in ff3 w/the same exception. Am I missing something or  
doing something incorrectly?  
Thanks,  
Jonathan

---

<div class="post-metadata">

**Author:** ![waddilove](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/b5ac83/32.png) [@waddilove](https://www.ruby-forum.com/u/waddilove)\
**Post date:** [July 2, 2008, 10:20pm UTC](https://www.ruby-forum.com/t/default-behavior-on-unrecognized-route-in-development-and-production-environment/142045/2 "2008-07-02T22:20:16Z")

</div>

The default behavior is for RecordNotFound exceptions to display a 404.  
I  
don’t believe that’s true for routiing exceptions.

On Wed, Jul 2, 2008 at 2:50 PM, Jonathan W.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![waddilove](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/b5ac83/32.png) [@waddilove](https://www.ruby-forum.com/u/waddilove)\
**Post date:** [July 2, 2008, 10:33pm UTC](https://www.ruby-forum.com/t/default-behavior-on-unrecognized-route-in-development-and-production-environment/142045/3 "2008-07-02T22:33:46Z")

</div>

On Jul 2, 9:18 pm, “Brian H.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> The default behavior is for RecordNotFound exceptions to display a 404. I  
> don’t believe that’s true for routiing exceptions.

It’s also the case that requests form localhost are handled  
differently (when dealing with what is displayed when an error  
occurs).

Fred

---

<div class="post-metadata">

**Author:** ![waddilove](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/b5ac83/32.png) [@waddilove](https://www.ruby-forum.com/u/waddilove)\
**Post date:** [July 3, 2008, 12:12am UTC](https://www.ruby-forum.com/t/default-behavior-on-unrecognized-route-in-development-and-production-environment/142045/4 "2008-07-03T00:12:11Z")

</div>

Ahh that’s right! I forgot about that!

On Wed, Jul 2, 2008 at 3:33 PM, Frederick C.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
