I'm told "template is missing", but file is there!

Hi,

I’m working through the tutorial (http://wiki.rubyonrails.org/rails/
pages/TutorialHelperMethods), and have created this file – /usr/local/
apache2/htdocs/myproject/app/views/edit.rhtml, with 775 perms. The
file has these contents:

<%= form_tag({ :action => “update”, :id => @person.id }) %>
<%= hidden_field “person”, “id” %>
Name:
<%= text_field “person”, “name”, “size” => 20 %>

Street:

<%= text_field “person”, “street1”, “maxlength” => 20 %>

<%= text_field “person”, “street2”, “maxlength” => 20 %>

City:
<%= text_field “person”, “city”, “maxlength” => 20 %>

State:
<%= text_field “person”, “state”, “maxlength” => 2 %>

Zip:
<%= text_field “person”, “zip”, “maxlength” => 20 %>

and the controller, located at /usr/local/apache2/htdocs/myproject/app/
controllers/friends_controller.rb, has contents:

class FriendsController < ApplicationController
scaffold :person
def show
@person=Person.find(@params[“id”])
end
def edit
@person = Person.find(@params[“id”])
end
end

but when I visit http://mydomain:3000/friends/edit/1

I get the error: “Template is missing, Missing template /usr/local/
apache2/htdocs/myproject/app/views/friends/edit.rhtml”, which is odd b/
c the file is there. I have even tried restarting my server.

Any suggestions on how to troubleshoot? Thanks, - Dave

On Dec 5, 2007 5:35 PM, [email protected]
[email protected]
wrote:

Name:

def edit
Any suggestions on how to troubleshoot? Thanks, - Dave

Yeah, read the error that you’re getting. The answer is here in the
email.

(hint, the paths don’t match)

Jason

On Dec 5, 10:35 pm, “[email protected]
[email protected] wrote:

but when I visithttp://mydomain:3000/friends/edit/1

I get the error: “Template is missing, Missing template /usr/local/
apache2/htdocs/myproject/app/views/friends/edit.rhtml”, which is odd b/
c the file is there. I have even tried restarting my server.

Any suggestions on how to troubleshoot? Thanks, - Dave

Try http://mydomain:3000/friends/1/edit