David_small 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

 
Generic-user-small James West 42 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

James

 
Samr_small_small Sam Ruby 166 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.’

 
David_small 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

 
David_small 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.

David

 
Samr_small_small Sam Ruby 166 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)”.

 
Generic-user-small Garry Harthill 1 post

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.

 
Samr_small_small Sam Ruby 166 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.

8 posts, 4 voices