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

**URL:** <https://www.ruby-forum.com/t/im-told-template-is-missing-but-file-is-there/122258>\
**Category:** Rails\
**Created:** [December 5, 2007, 11:36pm UTC](https://www.ruby-forum.com/t/im-told-template-is-missing-but-file-is-there/122258 "2007-12-05T23:36:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [December 5, 2007, 11:36pm UTC](https://www.ruby-forum.com/t/im-told-template-is-missing-but-file-is-there/122258/1 "2007-12-05T23:36:47Z")

</div>

Hi,

I’m working through the tutorial ([http://wiki.rubyonrails.org/rails/](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](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

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [December 5, 2007, 11:41pm UTC](https://www.ruby-forum.com/t/im-told-template-is-missing-but-file-is-there/122258/2 "2007-12-05T23:41:30Z")

</div>

On Dec 5, 2007 5:35 PM, removed\_email\_address@domain.invalid  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
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

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [December 7, 2007, 10:28pm UTC](https://www.ruby-forum.com/t/im-told-template-is-missing-but-file-is-there/122258/3 "2007-12-07T22:28:19Z")

</div>

On Dec 5, 10:35 pm, “removed\_email\_address@domain.invalid”  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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](http://mydomain:3000/friends/1/edit)
