small medium large xlarge

17 Jun 2008, 03:41
David Schwartz (26 posts)

I can’t seem to get the login screen. http:/localhost:3000/login/login, as suggested by the figure on the top of pg 169, results in an error: ‘No route matches “/login/login” with {:method=>:get}’. I can’t seem to get the login screen. http:/localhost:3000/login gets a similar result: ‘No route matches “/login” with {:method=>:get}’

Since the admin_controller.rb has the login method, I’d assume the correct URL would be http:/localhost:3000/admin/login but this fails as well.

BTW, the text contains: ‘Create the template in the file index.html.erb in the directory app/views/login.’ However, the code that follows it has the following heading: ‘Download depot_p/app/views/admin/index.html.erb’. Please advise.

TIA, David

17 Jun 2008, 12:20
James West (104 posts)

Hi, I must admit that I had very few problems when following the book in this area.

My log in works fine when I visit the http:/localhost:3000/admin/login

With my very limited knwledge, gleaned solely from working thriugh the book (On my 3rd iteration now it sounds like that there might be something wrong with the admin controller that you have generated.

I am sorry that I do not have a great deal of experience to impart great pearls of wisdom but one thing I have learned is that when I come up agaist a problem when following the book I tend to stsart that section again deleting files and regenerating them.

I quite often find I have made a typo somewhere and copying and pasting fro the PDF then comparing what I have actually written usually helps me understand what I have done wrong.

I hope that in some small way this will help


17 Jun 2008, 14:06
Sam Ruby (633 posts)

I will confirm that http:/localhost:3000/admin/login is the correct URI to use. The image on page 170 has yet to be updated.

In B1.3 the text read: ‘Create the template in the file index.html.erb in the directory app/views/admin.’

19 Jun 2008, 01:51
David Schwartz (26 posts)

I don’t know why, but http:/localhost:3000/admin/login now works! I wonder what it could have been?

Thanks, David

19 Jun 2008, 02:13
David Schwartz (26 posts)

Actually, the text at the bottom of page 167 instructs the reader to ‘Create the template in the file index.html.erb in the directory app/views/login.’ I believe it belongs in the app/views/admin directory.


19 Jun 2008, 11:07
Sam Ruby (633 posts)

In beta 1.3, the text is on page 170, and reflects the correct directory name. Please verify which printing you are looking at – it is at the very bottom right of the page (inside the red bar), and should read “this copy is (B1.3 printing, June 4, 2008)”.

19 Jun 2008, 20:55
Garry Harthill (2 posts)

I noticed later on in the Testing section of the book in the chapter that deals with Controller (Functional Testing of Controllers) it refers to ‘login_controller’. I don’t have this controller. Login is handle in admin_controller.

19 Jun 2008, 22:05
Sam Ruby (633 posts)

Chapter 13 has not been updated to Rails 2.x. See pages 2 and 15 for more details. Or just look at the color of the bars at the top and bottom of the pages.

26 Dec 2009, 11:24
Jerome Marchand (2 posts)

I experienced the same ‘no route’ problem even though I had the index.html.erb file in the proper views/login directory.

I traced back my steps and may have an explanation. I had built the user.rb model in steps, adding the require (line 1) at the end of the process. A bit as the tutorial builds. After restarting the server, the page appeared.

You must be logged in to comment