# List.rhtml error

**URL:** <https://www.ruby-forum.com/t/list-rhtml-error/142422>\
**Category:** Rails\
**Created:** [July 7, 2008, 9:14pm UTC](https://www.ruby-forum.com/t/list-rhtml-error/142422 "2008-07-07T21:14:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![harsh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/57b2e6/32.png) [@harsh](https://www.ruby-forum.com/u/harsh)\
**Post date:** [July 7, 2008, 9:14pm UTC](https://www.ruby-forum.com/t/list-rhtml-error/142422/1 "2008-07-07T21:14:54Z")

</div>

dear frnds…  
pls help me  
i hv stuck up in solving thw cookbook2 tutorial…  
in this i stuck at the point of creating views in which i have to  
create list.rhtml in views part of mine application and i have to  
change in my controller as  
def list  
@recipes=recipe.find\_all  
end  
and now i am opening the link in my browser  
[http://localhost:3000/recipe/list](http://localhost:3000/recipe/list)  
the page is not opening.the error which is dispaying on the page is as  
follows…  
NameError in RecipeController#list  
undefined local variable or method `recipe' for #<RecipeController: 0x4855b48> RAILS_ROOT: ./script/../config/.. Application Trace | Framework Trace | Full Trace #{RAILS_ROOT}/app/controllers/recipe_controller.rb:4:in `list’  
Request  
Parameters: None  
Show session dump  
Response  
Headers: {“cookie”=\>[], “Cache-Control”=\>“no-cache”}

this is the error which i am reciving in solving cookbook2  
example…

pls help me in solving this problem…  
i am very thankful to one who pls help me in solving this problem  
waiting for reply…

---

<div class="post-metadata">

**Author:** ![harsh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/57b2e6/32.png) [@harsh](https://www.ruby-forum.com/u/harsh)\
**Post date:** [July 7, 2008, 9:19pm UTC](https://www.ruby-forum.com/t/list-rhtml-error/142422/2 "2008-07-07T21:19:35Z")

</div>

harsh wrote:

> dear frnds…  
> pls help me  
> i hv stuck up in solving thw cookbook2 tutorial…  
> in this i stuck at the point of creating views in which i have to  
> create list.rhtml in views part of mine application and i have to  
> change in my controller as  
> def list  
> @recipes=recipe.find\_all  
> end

While humans can tolerate a lack of capitalisation, ruby won’t. That  
should be Recipe. In addition find\_all is deprecated (and probably  
removed by now), which suggests that you are following a rather out of  
date tutorial (you should write Recipe.find :all instead)

Fred

---

<div class="post-metadata">

**Author:** ![harsh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/57b2e6/32.png) [@harsh](https://www.ruby-forum.com/u/harsh)\
**Post date:** [July 9, 2008, 6:50pm UTC](https://www.ruby-forum.com/t/list-rhtml-error/142422/3 "2008-07-09T18:50:31Z")

</div>

sir after changing the path same is not running.  
template missing error is displaying there .  
pls help me in one other case that how i can link some data to  
wikipedia in ruby…??

---

<div class="post-metadata">

**Author:** ![harsh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/57b2e6/32.png) [@harsh](https://www.ruby-forum.com/u/harsh)\
**Post date:** [July 9, 2008, 6:55pm UTC](https://www.ruby-forum.com/t/list-rhtml-error/142422/4 "2008-07-09T18:55:47Z")

</div>

On 9 Jul 2008, at 17:49, harsh wrote:

> sir after changing the path same is not running.  
> template missing error is displaying there .  
> I’d check that the template exists (in the right place, with  
> appropriate capitalisation etc…)

Fred
