Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Open Source > BOOK: Beginning Ruby on Rails
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
BOOK: Beginning Ruby on Rails
This is the forum to discuss the Wrox book Beginning Ruby on Rails by Steve Holzner Ph.D.; ISBN: 9780470069158
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Ruby on Rails section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 24th, 2009, 08:32 PM
Registered User
Join Date: Jan 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Ch 09 router app error

I am receiving the following routing error when attempting to connect to http://localhost:3000/look/at/15/11/2007:

Routing Error

no route found to match "/look/at/15/11/2007" with {:method=>:get}___________________

Here's what I have for Ch09/router/config/routes.rb (comments redacted):

ActionController::Routing::Routes.draw do |map|

map.connect ':controller/service.wsdl', :action => 'wsdl'

map.connect ':controller/:action/:id'

map.connect "look/at/:day/:month/:year",
:controller => "look",
:action => "at",
:requirements => {:year => / (19|20)\d\d/}

map.connect "anything",
:controller => "look",
:action => "unknown_request"
Here's my at.rhtml code:

<title>Routing requirements</title>

<h1>Routing Requests</h1>
Day: <%= @day %>
Month: <%= @month %>
Year: <%= @year %>


Routing words just fine for http://localhost:3000/look/at/:

Routing Requests


But it seems to break down as soon as I add the additional day/month/year routing.

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to detect router ip pikachew Classic ASP Basics 4 July 5th, 2007 08:29 PM
Login To ADSL Router ibmsuh VB.NET 0 November 7th, 2006 06:12 AM
CH 09 AjaxMail SQL coders4hire BOOK: Professional Ajax ISBN: 978-0-471-77778-6 2 June 22nd, 2006 08:03 PM
Dynamic IP of Router jack_3 C# 0 November 15th, 2005 10:02 PM
Winsock Problem when server run behind the router mihir9274 VB Components 0 November 29th, 2003 05:19 PM

All times are GMT -4. The time now is 01:37 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.