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

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

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

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

http://guides.rubyonrails.org

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?

Sean Six 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 Six 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,

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

Marnen Laibow-Koser wrote:

Sean Six 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
marnen@marnen.org

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....."

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.

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,

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