# Version fu problem

**URL:** <https://www.ruby-forum.com/t/version-fu-problem/163916>\
**Category:** Rails\
**Created:** [March 26, 2009, 4:34am UTC](https://www.ruby-forum.com/t/version-fu-problem/163916 "2009-03-26T04:34:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Freddy\_A](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/6de8d8/32.png) [@Freddy\_A](https://www.ruby-forum.com/u/Freddy_A)\
**Post date:** [March 26, 2009, 4:34am UTC](https://www.ruby-forum.com/t/version-fu-problem/163916/1 "2009-03-26T04:34:38Z")

</div>

Hi,

I have a class that uses version\_fu (Page class) the issue is that if  
I run a clean migration it fails on the version\_fu declaration in the  
Page class, Its looking for the page\_versions column that has not been  
created yet.

Anyone seen this before?

Looks like if I do

version\_fu rescue nil

The error does not show and my migration runs all the way to the  
end… isn’t that just ugly?

---

<div class="post-metadata">

**Author:** ![Freddy\_A](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/6de8d8/32.png) [@Freddy\_A](https://www.ruby-forum.com/u/Freddy_A)\
**Post date:** [March 26, 2009, 5:16pm UTC](https://www.ruby-forum.com/t/version-fu-problem/163916/2 "2009-03-26T17:16:30Z")

</div>

Freddy A. wrote:

> I have a class that uses version\_fu (Page class) the issue is that if  
> I run a clean migration it fails on the version\_fu declaration in the  
> Page class, Its looking for the page\_versions column that has not been  
> created yet.

For this reason you should use rake db:schema:load instead of  
db:migrate.  
Otherwise, you’ll have to come up with ugly tricks.

–  
Roderick van Domburg  
[http://www.nedforce.com](http://www.nedforce.com)
