Super noob needs help

I am following video tutorials for rails.

I am a part where i am suppose to write “scaffold :album” inside
admin_controller.

"class AdminController < ApplicationController

scaffold :album
end
"

I did that but i get this error “undefined method `scaffold’ for
AdminController:Class”

What is going on? i am running rails 2.3.5

thanks

On Wed, Jan 27, 2010 at 11:09 PM, Afg A. [email protected] wrote:

I did that but i get this error “undefined method `scaffold’ for
AdminController:Class”

What is going on? i am running rails 2.3.5

thanks

Hi, I would recommend using the following link to learn Rails:

Good luck,

-Conrad

Is the tutorial telling you to put that code in the AdminController? It
is my guess that the code is based on a plugin or gem. Have you
included all the proper plugins and gems?

Scaffolding was pulled out into a plugin in Rails 2.0
In order to follow that tutorial, you’ll need to install it:

script/plugin install scaffolding

However, that tutorial seems pretty out of date. You might want to
find a newer one.

-Ethan

Sean S. wrote:

Is the tutorial telling you to put that code in the AdminController? It
is my guess that the code is based on a plugin or gem. Have you
included all the proper plugins and gems?

Yeah i installed --independencies

still it wont work.

Ethan Gunderson wrote:

Scaffolding was pulled out into a plugin in Rails 2.0
In order to follow that tutorial, you’ll need to install it:

script/plugin install scaffolding

However, that tutorial seems pretty out of date. You might want to
find a newer one.

-Ethan

It says “ruby: No such file or directory – script/plugin (LoadError)”

Sean S. wrote:

Is the tutorial telling you to put that code in the AdminController? It
is my guess that the code is based on a plugin or gem. Have you
included all the proper plugins and gems?

Scaffold (in the controller) used to be part of Rails. It was removed
in 2.0. The original poster should find a current tutorial!

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]

Are you inside of your project directory when running that command?

Can you not install the plugin for some reason? Alternatively, you could
always install the version of rails that he is using, which must be a
pre
2.0 rails.

Marnen Laibow-Koser wrote:

Sean S. wrote:

Is the tutorial telling you to put that code in the AdminController? It
is my guess that the code is based on a plugin or gem. Have you
included all the proper plugins and gems?

Scaffold (in the controller) used to be part of Rails. It was removed
in 2.0. The original poster should find a current tutorial!

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]

yeah i guess so and i cant find a way to get around it. I am a visual
learner and these videos help me understand better.

He makes the databases manually in cmd. then db:migrate and then he goes
to the admin_controller.rb and put “scaffold :albums” and everything
works. when i do the same thing i get “unexpected action view…”

Ethan Gunderson wrote:

Can you not install the plugin for some reason?

Bad idea. Scaffolding is best avoided.

Alternatively, you could
always install the version of rails that he is using, which must be a
pre
2.0 rails.

No, please don’t do that. Learn the current version of Rails. The
Rails Guides and Railscasts should get you started.

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]

I entirely agree, and we’ve all recommended the same, but he seems
pretty
set on using these certain tutorials :slight_smile:

On Fri, Jan 29, 2010 at 2:02 PM, Marnen Laibow-Koser