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 %><br/> Street:<br /> <%= text_field "person", "street1", "maxlength" => 20 %><br/> <%= text_field "person", "street2", "maxlength" => 20 %><br/> City: <%= text_field "person", "city", "maxlength" => 20 %><br/> State: <%= text_field "person", "state", "maxlength" => 2 %><br/> Zip: <%= text_field "person", "zip", "maxlength" => 20 %><br/> <input type="submit" value="Save"> </form>

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

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

(hint, the paths don’t match)

Jason

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