Web development agility-Application of rails for agile web development, version 2nd chapter 6th error: Undefined method 'scaffold' for admincontroller: c

Source: Internet
Author: User
I recently learned how to develop agile Web applications-applying rails for agile web development, version 2nd. When I implemented depot in chapter 1
Create the "goods maintenance" application,
Class admincontroller <applicationcontroller
Scaffold: Product
End
Then
Depot> Ruby script/Server
An error occurs when I enter localhost: 3000/admin in the browser:
Undefined method 'scaffold' for admincontroller: class.
Depressed for a while, I found some materials online. Finally solved, happy...

First, describe my development environment: ruby1.8.6 rails2.0.2
The development environment in the book is: ruby1.8.4 rails1.2
Rails2.0.2 separates scaffold from the plug-in, that is, rails2.0.2 cannot directly use scaffold. You need to install two plug-ins.

1. First install Scaffold
Depot> Ruby script/plugin install http://dev.rubyonrails.com/svn/rails/plugins/scaffolding/
Run localhost: 3000/admin again.
Undefined method 'paginate' for # <admincontroller: 0x3b62210>
Check to know that this is a paging function.

2. Install the old classic_pagination

Ruby script/plugin install http://tools.assembla.com/svn/breakout/breakout/vendor/plugins/classic_pagination/

The above should be OK.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.