# Acts\_as\_versioned issues

**URL:** <https://www.ruby-forum.com/t/acts-as-versioned-issues/151138>\
**Category:** Rails\
**Created:** [October 17, 2008, 10:02am UTC](https://www.ruby-forum.com/t/acts-as-versioned-issues/151138 "2008-10-17T10:02:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sporkmonger](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f07891/32.png) [@sporkmonger](https://www.ruby-forum.com/u/sporkmonger)\
**Post date:** [October 17, 2008, 10:02am UTC](https://www.ruby-forum.com/t/acts-as-versioned-issues/151138/1 "2008-10-17T10:02:58Z")

</div>

I’m in the midst of an upgrade from Rails 2.0.2 to 2.1.1. We were  
using an older version of acts\_as\_versioned and after upgrading both  
Rails and acts\_as\_versioned we have 146 tests failing, mostly  
acts\_as\_versioned related.

[snip the 140 or so identical failing tasks]  
145)  
NoMethodError in ‘TaskTemplate should not re-create tasks for parts’  
undefined method `version=' for #<Part::Version:0x3e3b2fc> /Library/Ruby/Gems/1.8/gems/activerecord-2.1.1/lib/active_record/ attribute_methods.rb:251:in`method\_missing’  
/Users/sporkmonger/Projects/Ruby/RailsSites/day/mojo/core/vendor/  
plugins/acts\_as\_versioned/lib/acts\_as\_versioned.rb:276:in `send' /Users/sporkmonger/Projects/Ruby/RailsSites/day/mojo/core/vendor/ plugins/acts_as_versioned/lib/acts_as_versioned.rb:276:in`save\_version’  
/Library/Ruby/Gems/1.8/gems/activesupport-2.1.1/lib/active\_support/  
callbacks.rb:173:in `send' /Library/Ruby/Gems/1.8/gems/activesupport-2.1.1/lib/active_support/ callbacks.rb:173:in`evaluate\_method’  
/Library/Ruby/Gems/1.8/gems/activesupport-2.1.1/lib/active\_support/  
callbacks.rb:161:in `call' /Library/Ruby/Gems/1.8/gems/activesupport-2.1.1/lib/active_support/ callbacks.rb:93:in`run’  
/Library/Ruby/Gems/1.8/gems/activesupport-2.1.1/lib/active\_support/  
callbacks.rb:92:in `each' /Library/Ruby/Gems/1.8/gems/activesupport-2.1.1/lib/active_support/ callbacks.rb:92:in`send’  
/Library/Ruby/Gems/1.8/gems/activesupport-2.1.1/lib/active\_support/  
callbacks.rb:92:in `run' /Library/Ruby/Gems/1.8/gems/activesupport-2.1.1/lib/active_support/ callbacks.rb:272:in`run\_callbacks’  
/Library/Ruby/Gems/1.8/gems/activerecord-2.1.1/lib/active\_record/  
callbacks.rb:298:in `callback' /Library/Ruby/Gems/1.8/gems/activerecord-2.1.1/lib/active_record/ callbacks.rb:208:in`create\_or\_update’  
/Library/Ruby/Gems/1.8/gems/activerecord-2.1.1/lib/active\_record/  
base.rb:2211:in `save_without_validation' /Library/Ruby/Gems/1.8/gems/activerecord-2.1.1/lib/active_record/ validations.rb:911:in`save\_without\_dirty’  
/Library/Ruby/Gems/1.8/gems/activerecord-2.1.1/lib/active\_record/  
dirty.rb:75:in `save_without_transactions' /Library/Ruby/Gems/1.8/gems/activerecord-2.1.1/lib/active_record/ transactions.rb:106:in`save’  
/Library/Ruby/Gems/1.8/gems/activerecord-2.1.1/lib/active\_record/  
connection\_adapters/abstract/database\_statements.rb:66:in  
`transaction' /Library/Ruby/Gems/1.8/gems/activerecord-2.1.1/lib/active_record/ transactions.rb:79:in`transaction’  
/Library/Ruby/Gems/1.8/gems/activerecord-2.1.1/lib/active\_record/  
transactions.rb:98:in `transaction' /Library/Ruby/Gems/1.8/gems/activerecord-2.1.1/lib/active_record/ transactions.rb:106:in`save’  
/Library/Ruby/Gems/1.8/gems/activerecord-2.1.1/lib/active\_record/  
transactions.rb:118:in `rollback_active_record_state!' /Library/Ruby/Gems/1.8/gems/activerecord-2.1.1/lib/active_record/ transactions.rb:106:in`save’  
/Library/Ruby/Gems/1.8/gems/activerecord-2.1.1/lib/active\_record/  
base.rb:644:in `create’  
./spec/models/task\_template\_spec.rb:17:

It seems to be trying to set the version\_column value. I checked and  
the parts table (and all of the other versioned models) does have the  
version field present. The part\_versions table is also present. What  
am I missing?

---

<div class="post-metadata">

**Author:** ![sporkmonger](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f07891/32.png) [@sporkmonger](https://www.ruby-forum.com/u/sporkmonger)\
**Post date:** [October 17, 2008, 1:13pm UTC](https://www.ruby-forum.com/t/acts-as-versioned-issues/151138/2 "2008-10-17T13:13:17Z")

</div>

The acts\_as\_versioned plugin is not compatible with rails 2.1 as I  
understand. You should look at version\_fu…

> **[GitHub - jmckible/version\_fu: Rails 3 update of acts\_as\_versioned](https://github.com/jmckible/version_fu/tree/master)**
>
> master

---

<div class="post-metadata">

**Author:** ![sporkmonger](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f07891/32.png) [@sporkmonger](https://www.ruby-forum.com/u/sporkmonger)\
**Post date:** [October 17, 2008, 9:05pm UTC](https://www.ruby-forum.com/t/acts-as-versioned-issues/151138/3 "2008-10-17T21:05:24Z")

</div>

Really? We use acts\_as\_versioned with Rails 2.1 in Kete (  
[http://kete.net.nz/](http://kete.net.nz/)). We may have done some slight hacking, but  
shouldn’t  
be too bad.  
You can see our version here:

[http://github.com/kete/kete/tree/master/vendor/plugins/acts\_as\_versioned](http://github.com/kete/kete/tree/master/vendor/plugins/acts_as_versioned)

You can see from  
[http://github.com/kete/kete/tree/master/vendor/plugins/acts\_as\_versioned/.piston.ymlthat](http://github.com/kete/kete/tree/master/vendor/plugins/acts_as_versioned/.piston.ymlthat)  
it is based on  
git://github.com/technoweenie/acts\_as\_versioned.git. We possibly  
included  
some hacks on top of the stuff from that repository in our local  
version.

Cheers,  
Walter
