O'Reilly Forums: Chapter 4 "routing Error" - O'Reilly Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Chapter 4 "routing Error"

#1 User is offline   MMWW 

  • New Member
  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 10-May 11

Posted 10 May 2011 - 02:03 PM

Hi,

I am currently working throught the book, using rails 3.0.7. I have realised by now that the book is based on Rails 2, so the following error might have something to do with that.
I keep getting a weird routing error when trying to launch the form for entering your name. The code for the view and the controller is:

sign_in.html.erb:

<html>
<head><title>Hello <%=h @name %></title></head>

<body>
<h1>Hello <%=h @name %></h1>

<% form_tag :action => 'sign_in' do %>
   <p>Enter your name:
   <%= text_field_tag 'visitor_name', @name %></p>

   <%= submit_tag 'Sign in' %>

<% end %>
</body>
</html>


controller:
class EntriesController < ApplicationController
    
    def sign_in
        @name = params[:visitor_name]
    end
    
end


With this constellation I get the error: "Routing Error uninitialized constant Guestbook::Entries"
when navigating to "http://localhost:3000/guestbook/entries/"

Any ideas what might be causing this? I am stuck.
0

#2 User is offline   Loneu88 

  • New Member
  • Pip
  • Group: Members
  • Posts: 5
  • Joined: 18-May 12

Posted 23 May 2012 - 01:32 AM

Yeah, I'm facing same problem too during use of rails 3.0.7. I have search for solution in online but filed to get proper solution for this problem.
0

#3 User is offline   jespinto 

  • Active Member
  • PipPip
  • Group: Members
  • Posts: 16
  • Joined: 18-June 13
  • Gender:Male

Posted 08 July 2013 - 05:22 AM

I had the same problem too. Couldn't find the solution anywhere. ow hunting in forums


_______________
agile software development
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users