Forum: Ruby on Rails newbie question: missing template

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
F84c1d4daebb12e55fd72ee52aa64e03?d=identicon&s=25 Angela Hilton (akh)
on 2006-05-24 10:50
Hi

I'm new to this forum and new to Rails so excuse me if this is a daft
question.

I'm following the ONLamp.com tuturial and all has been well untill
changing the template for the recipes.  I have followed the instructions
and added this code to the controller:

class RecipeController < ApplicationController
	scaffold :recipe
	def list
	 @recipes = Recipe.find_all
	end
end

I have also created the list.rhtml file to the
C:\rails\cookbook\app\views\recipe directory using the html supplied.

However I now get this error when trying to view the recipe list:
Template is missing

Missing template ./script/../config/../app/views/recipe/list.rhtml

I have tried re-doing all the above, and restarting the server....any
ideas?

TIA
A
A4a8fefcbd2cd6d2370609a5e2a3a389?d=identicon&s=25 Rob Merrell (Guest)
on 2006-05-24 10:58
(Received via mailing list)
You need to have a list.rhtml file in your views/recipe/ directory.

Rob
A4a8fefcbd2cd6d2370609a5e2a3a389?d=identicon&s=25 Rob Merrell (Guest)
on 2006-05-24 11:07
(Received via mailing list)
Sorry glazed over the part where you said you had it, oops...
F84c1d4daebb12e55fd72ee52aa64e03?d=identicon&s=25 Angela Hilton (akh)
on 2006-05-24 13:58
Rob Merrell wrote:
> Sorry glazed over the part where you said you had it, oops...

no problem - i stil acnt work it out.  feel like i'm missing a really
obviuos point!

A
A4a8fefcbd2cd6d2370609a5e2a3a389?d=identicon&s=25 Rob Merrell (Guest)
on 2006-05-24 17:48
(Received via mailing list)
Hmmm, what does your directory structure look like inside of /apps?
2b891e820c238ded365d035771603f21?d=identicon&s=25 Bill Walton (Guest)
on 2006-05-24 21:07
(Received via mailing list)
Hi Angela,

Angela Hilton wrote:
<snip>

> However I now get this error when trying to view the recipe list:
> Template is missing
>
> Missing template ./script/../config/../app/views/recipe/list.rhtml

If you're using Windows, I recommend you make doubly sure that your file
is
really named list.rhtml.

I've seen folks have problems where Explorer was not set to the Detail
view.
They'd be seeing, for example, list.rhtml but when they set Explorer to
the
Detail view they could see that the real name was list.rhtml.txt or
something.  Fire back if that's not the problem.

Best regards,
Bill
This topic is locked and can not be replied to.