文章

目前顯示的是 十月, 2008的文章

an acts_as_versioned error/bug with Rails 2.1 -在rails 2.1用acts_as_versioned插件奇怪的錯誤

use acts_as_versioned plug-in lead to an unknown exception: "NoMethodError: You have a nil object when you didn't expect it!" from /opt/local/lib/ruby/gems/ 1 .8/gems/activerecord- 2 . 1 . 0 /lib/active_record/attribute_methods.rb: 211 :in `version=' from /Users/toby/rorbar/olhc_website/vendor/plugins/ acts_as_versioned /lib/ acts_as_versioned .rb:431:in `send' from /Users/toby/rorbar/olhc_website/vendor/plugins/ acts_as_versioned /lib/ acts_as_versioned .rb:431:in `set_new_version' It is maybe because of out-of-day acts_as_versioned plugin with rails 2.1 or above. The partial updates feature in 2 . 1 caused a conflict with the the way acts_as_versioned handles it's own change history. Check out the latest master on github as this has been resolved: http://github.com/technoweenie/ acts_as_versioned /tree/master see http://www.nabble.com/acts_as_versioned-and-Rails-2.1-td17665890.html To solve this. reinstall the acts_as_versioned gem. or download tarbal/