# \[Rails 3\] How to test routes urls in console

**URL:** <https://www.ruby-forum.com/t/rails-3-how-to-test-routes-urls-in-console/193157>\
**Category:** Rails\
**Created:** [August 12, 2010, 9:15am UTC](https://www.ruby-forum.com/t/rails-3-how-to-test-routes-urls-in-console/193157 "2010-08-12T09:15:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kadoudal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/f0a364/32.png) [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Post date:** [August 12, 2010, 9:15am UTC](https://www.ruby-forum.com/t/rails-3-how-to-test-routes-urls-in-console/193157/1 "2010-08-12T09:15:24Z")

</div>

I tried require ‘url\_writer’  
but this is not the trick

what should be required/included to test the routes urls ?

thanks

erwin

---

<div class="post-metadata">

**Author:** ![kadoudal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/f0a364/32.png) [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Post date:** [August 12, 2010, 4:32pm UTC](https://www.ruby-forum.com/t/rails-3-how-to-test-routes-urls-in-console/193157/2 "2010-08-12T16:32:09Z")

</div>

A quick Google search would have yielded this:  
[http://blog.zobie.com/2008/11/testing-routes-in-rails/](http://blog.zobie.com/2008/11/testing-routes-in-rails/)

AWDWR also has a pretty good section on how to test routes.

---

<div class="post-metadata">

**Author:** ![kadoudal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/f0a364/32.png) [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Post date:** [August 13, 2010, 11:05am UTC](https://www.ruby-forum.com/t/rails-3-how-to-test-routes-urls-in-console/193157/3 "2010-08-13T11:05:01Z")

</div>

sure, but my question was related to the ‘console’ … and last  
Rails version … Rails 3  
thanks for this link ,I’ll keep it in a safe place

---

<div class="post-metadata">

**Author:** ![kadoudal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/f0a364/32.png) [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Post date:** [August 13, 2010, 4:21pm UTC](https://www.ruby-forum.com/t/rails-3-how-to-test-routes-urls-in-console/193157/4 "2010-08-13T16:21:09Z")

</div>

The link explains how to test in the console. Not sure if the example  
will work with Rails 3 but my guess is that it will. Rails 3 was never  
mentioned in the OP. 😉

---

<div class="post-metadata">

**Author:** ![kadoudal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/f0a364/32.png) [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Post date:** [August 13, 2010, 12:04pm UTC](https://www.ruby-forum.com/t/rails-3-how-to-test-routes-urls-in-console/193157/5 "2010-08-13T12:04:44Z")

</div>

On 12 August 2010 08:14, Erwin [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I tried require ‘url\_writer’  
> but this is not the trick
> 
> what should be required/included to test the routes urls ?

What do you mean by testing the routes urls (in console)?  
By the way it is a good idea to be explicit in the text of message  
rather than relying on the subject to clarify what you are asking.

Colin
