Recently I learned ror and bought a book titled agile web development-applying rails for agile web development, version 2nd.
When the sixth chapter "task a: Goods maintenance" was completed, it was unable to proceed, and according to the book, the following Code Class admincontroller <applicationcontroller
Scaffold: Products
Def Admin
Render: text => "hello"
End
When running the end command, the following error is reported: Undefined method 'scaffold' for admincontroller: class is not supported. My girlfriend can only ask me for help. I remember how rails was running before. Why not? Is the version upgrade incompatible with earlier versions? Class and method change? (My girlfriend learned to use Ruby 1.8.6 and rails 2.0.2) So I quickly checked the information and found that rails2.0.2 stripped scaffold as a plug-in, that is to say, scaffold cannot be used directly in rails2.0.2. So I installed it first. Netbeans-right-click the project depot-select rails plugins-select new plugins-select scaffolding for installation. Or depot> Ruby script/plugin install http://dev.rubyonrails.com/svn/rails/plugins/scaffolding/ and then re-run the project, access, this Returns another error: Undefined method 'paginate' for # <admincontroller: 0x3b62210> dizzy, needless to say, this method should also be removed when rails2.0.2, and then check the information. It turns out to be a paging function, so let's reinstall it. I don't know why. I added it to netbeans.
SVN: // errtheblog.com/svn/plugins
But netbeans prompts that the search is successfully added, but the plug-in cannot be searched. No matter what the cause is, solving the problem is the most important. Next I will use tortoisesvn through
Depot> Ruby script/plugin install SVN: // errtheblog.com/svn/plugins/classic_pagination
To download the plug-in classic_pagination, and then copy the folder to the project's vendor \ plugins folder, for example, depot \ vendor \ plugins. Restart the project and access http: // 127.0.0.1: 3000/admin? Well, let's continue learning in books!