# NoMethodError

**URL:** <https://www.ruby-forum.com/t/nomethoderror/96932>\
**Category:** Rails\
**Created:** [December 9, 2005, 5:42am UTC](https://www.ruby-forum.com/t/nomethoderror/96932 "2005-12-09T05:42:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sharon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/67e7ee/32.png) [@sharon](https://www.ruby-forum.com/u/sharon)\
**Post date:** [December 9, 2005, 5:42am UTC](https://www.ruby-forum.com/t/nomethoderror/96932/1 "2005-12-09T05:42:45Z")

</div>

Hi,

IÂ?ve just downloaded and installed Ruby on Rails, on a windows xp  
machine.  
Then I tried the cookbook tutorial, and get NoMethodError in Recipe#New  
when  
I try [http://localhost:3000/recipe/new/](http://localhost:3000/recipe/new/). I could not figure out the  
problem  
so I tried another tutorial, the todo list one, and the same thing  
happens(NoMethodError in todo#list when I try  
[http://localhost:300/todo/](http://localhost:300/todo/) .  
Both of these occur right after the step where I add scaffold :todo, or  
scaffold Â?:recipe in the controller. So, I figure my scaffold isnÂ?t  
getting  
built. Is this what it means? What can I do about it. I want to get into  
Ruby on Rails, but am stuck for now on the threshold.

TIA,  
S

---

<div class="post-metadata">

**Author:** ![sharon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/67e7ee/32.png) [@sharon](https://www.ruby-forum.com/u/sharon)\
**Post date:** [December 9, 2005, 6:03am UTC](https://www.ruby-forum.com/t/nomethoderror/96932/2 "2005-12-09T06:03:03Z")

</div>

On Dec 8, 2005, at 9:41 PM, Sharon Phelps wrote:

> after the step where I add scaffold :todo, or scaffold â??:recipe in  
> the controller. So, I figure my scaffold isnâ??t getting built. Is  
> this what it means? What can I do about it. I want to get into Ruby  
> on Rails, but am stuck for now on the threshold.  
> Hi Sharon,

If you want to rule out the scaffolding as the problem, try making a  
simple method like this (no view code or file necessary):

class RecipeController \< Application  
def test  
render :text =\> “Testing… testing…”  
end  
end

Also, check the logs and you’ll probably find more information  
there. I usually use the ‘tail’ command on unix systems to  
continuously show me the log file while I develop. If there’s no  
equivalent on XP, just open /log/development.log and see what you get  
in there.

Duane J.  
(canadaduane)

---

<div class="post-metadata">

**Author:** ![sharon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/67e7ee/32.png) [@sharon](https://www.ruby-forum.com/u/sharon)\
**Post date:** [September 25, 2007, 11:07pm UTC](https://www.ruby-forum.com/t/nomethoderror/96932/3 "2007-09-25T23:07:19Z")

</div>

On 4/10/07, Zak K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Extracted source (around line #1): 1:
> 
> ## \<%= @story.name %\>
>   
> 2: 
> 
> \<%= link\_to @story.link, @story.link %\>

That means that your @story variable is nil. Did you set it in your  
controller? Something like:

@story = Story.find params[:id]

Pat

---

<div class="post-metadata">

**Author:** ![sharon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/67e7ee/32.png) [@sharon](https://www.ruby-forum.com/u/sharon)\
**Post date:** [December 26, 2009, 12:39pm UTC](https://www.ruby-forum.com/t/nomethoderror/96932/4 "2009-12-26T12:39:56Z")

</div>

On Thu, Dec 24, 2009 at 12:06 AM, dwhitekiss [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Is this correct

It “correctly” shows your migration failing. You need to fix that. 🙂

> # == Books: migrating
> 
> – create\_table(:books)  
> rake aborted!  
> An error has occurred, all later migrations canceled:
> 
> Mysql::Error: Table ‘books’ already exists:

–  
Hassan S. ------------------------ removed\_email\_address@domain.invalid  
twitter: @hassan

–

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 removed\_email\_address@domain.invalid.  
To unsubscribe from this group, send email to  
removed\_email\_address@domain.invalid.  
For more options, visit this group at  
[http://groups.google.com/group/rubyonrails-talk?hl=en](http://groups.google.com/group/rubyonrails-talk?hl=en).

---

<div class="post-metadata">

**Author:** ![sharon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/67e7ee/32.png) [@sharon](https://www.ruby-forum.com/u/sharon)\
**Post date:** [December 26, 2009, 6:01pm UTC](https://www.ruby-forum.com/t/nomethoderror/96932/5 "2009-12-26T18:01:52Z")

</div>

sharon wrote:

> Hi,
> 
> Iï¿½?ve just downloaded and installed Ruby on Rails, on a windows xp  
> machine.  
> Then I tried the cookbook tutorial, and get NoMethodError in Recipe#New  
> when  
> I try [http://localhost:3000/recipe/new/](http://localhost:3000/recipe/new/). I could not figure out the  
> problem  
> so I tried another tutorial, the todo list one, and the same thing  
> happens(NoMethodError in todo#list when I try  
> [http://localhost:300/todo/](http://localhost:300/todo/) .  
> Both of these occur right after the step where I add scaffold :todo, or  
> scaffold ï¿½?:recipe in the controller.

Rails 2.x no longer has scaffold as a controller method. You are  
following an old tutorial. If you’re using Rails 2.3 (and I hope you  
are), try the tutorials at [http://guides.rails.info](http://guides.rails.info) .

## Best,

Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid
