Forum: Ruby on Rails NoMethodError

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.
Bc73ebd76aa5a2a2b6b3d58755f60458?d=identicon&s=25 sharon (Guest)
on 2005-12-09 05:42
(Received via mailing list)
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/. 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/ .
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
D8cb8c8cd40ddf0cd05241443a591868?d=identicon&s=25 duane.johnson (Guest)
on 2005-12-09 06:03
(Received via mailing list)
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 Johnson
(canadaduane)
42172acdf3c6046f84d644cb0b94642c?d=identicon&s=25 Pat Maddox (pergesu)
on 2007-09-25 23:07
(Received via mailing list)
On 4/10/07, Zak Kidd <zacharykidd@gmail.com> wrote:
>
> Extracted source (around line #1): 1: <h2><%= @story.name %></h2>
> 2: <p><%= link_to @story.link, @story.link %></p>

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

@story = Story.find params[:id]

Pat
Bee69cfed999cd13e3bff73d472a39ee?d=identicon&s=25 Hassan Schroeder (Guest)
on 2009-12-26 12:39
(Received via mailing list)
On Thu, Dec 24, 2009 at 12:06 AM, dwhitekiss <dwhitekiss@gmail.com>
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 Schroeder ------------------------ hassan.schroeder@gmail.com
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.
Dd2d775dea75b381edb1bbf0600a0907?d=identicon&s=25 Marnen Laibow-Koser (marnen)
on 2009-12-26 18:01
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/. 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/ .
> 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 .

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
marnen@marnen.org
This topic is locked and can not be replied to.