Super noob needs help.

4 views
Skip to first unread message

Afg Afg

unread,
Jan 27, 2010, 11:09:59 PM1/27/10
to rubyonra...@googlegroups.com
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
--
Posted via http://www.ruby-forum.com/.

Conrad Taylor

unread,
Jan 28, 2010, 12:10:25 AM1/28/10
to rubyonra...@googlegroups.com
On Wed, Jan 27, 2010 at 11:09 PM, Afg Afg <li...@ruby-forum.com> wrote:
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:


Good luck,

-Conrad
 

--
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 rubyonra...@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.


Sean Six

unread,
Jan 28, 2010, 1:43:32 AM1/28/10
to rubyonra...@googlegroups.com
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?

Ethan Gunderson

unread,
Jan 27, 2010, 11:52:39 PM1/27/10
to Ruby on Rails: Talk
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

Afg Afg

unread,
Jan 28, 2010, 6:52:18 PM1/28/10
to rubyonra...@googlegroups.com
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.

Afg Afg

unread,
Jan 28, 2010, 6:55:34 PM1/28/10
to rubyonra...@googlegroups.com
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)"

Marnen Laibow-Koser

unread,
Jan 28, 2010, 7:24:34 PM1/28/10
to rubyonra...@googlegroups.com
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
mar...@marnen.org

Ethan Gunderson

unread,
Jan 28, 2010, 7:38:53 PM1/28/10
to rubyonra...@googlegroups.com
Are you inside of your project directory when running that command?

Afg Afg

unread,
Jan 29, 2010, 1:14:01 PM1/29/10
to rubyonra...@googlegroups.com

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

unread,
Jan 29, 2010, 2:00:58 PM1/29/10
to rubyonra...@googlegroups.com
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

unread,
Jan 29, 2010, 3:02:27 PM1/29/10
to rubyonra...@googlegroups.com
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
mar...@marnen.org

Ethan Gunderson

unread,
Jan 29, 2010, 3:41:17 PM1/29/10
to rubyonra...@googlegroups.com
I entirely agree, and we've all recommended the same, but he seems pretty set on using these certain tutorials :)

Reply all
Reply to author
Forward
0 new messages