laredotornado-8iDLEspWrrZBDgjK7y7TUQ@public.gmane.org
2007-Dec-05 22:35 UTC
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
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
Jason Roelofs
2007-Dec-05 22:40 UTC
Re: I''m told "template is missing", but file is there!
On Dec 5, 2007 5:35 PM, laredotornado-8iDLEspWrrZBDgjK7y7TUQ@public.gmane.org <laredotornado-8iDLEspWrrZBDgjK7y7TUQ@public.gmane.org> wrote:> > 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 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Dec 5, 10:35 pm, "laredotorn...-8iDLEspWrrZBDgjK7y7TUQ@public.gmane.org" <laredotorn...-8iDLEspWrrZBDgjK7y7TUQ@public.gmane.org> 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, - DaveTry http://mydomain:3000/friends/1/edit --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---