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
Register
Register | FAQ | Members List | Calendar | 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 Display Modes
  #1 (permalink)  
Old January 24th, 2009, 07: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"
end
_____________
Here's my at.rhtml code:

<html>
<head>
<title>Routing requirements</title>
</head>

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

____________

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

Routing Requests


Day:
Month:
Year:


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


Thread Tools
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 05: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 09:02 PM
Winsock Problem when server run behind the router mihir9274 VB Components 0 November 29th, 2003 04:19 PM



All times are GMT -4. The time now is 02:32 PM.


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