猪窝

2008-04-13

undefined method `scaffold’ 《Web开发敏捷之道》中的错误

Filed under: 工作经验 — admin @ 12:05 am

在第六章按照书中的方法无法进行,会提示undefined method `scaffold’的错误,找了半天,最终找到解决办法:

Rails2.0.2把scaffold 剥离为插件,也就是说Rails2.0.2里面不能直接使用scaffold了,而书中的版本与最新版还是对不上,所以需要重新安装,而且需要安装两个plugin

1. 执行 以下语句 安装scaffolding

ruby script/plugin install scaffolding

2. 分页插件的解决方法

状况如下:

undefined method `paginate’

解决办法:安装老的classic_pagination

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

参考资料:解决scaffold未定义问题
关于rails2.0.2中使用scaffold报错的问题

1 Comment »

  1. How soon will you update your blog? I’m interested in reading some more information on this issue.

    Comment by GarykPatton — 2009-06-16 @ 6:35 pm

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress