08 September 2008

stack level too deep bug with Rails 2.1 & will_paginate plugin

To live on the cutting edge of open source web frameworks (like Rails) is sometimes dangerous. How many times you have been slowed by some kind of regressions just after an upgrade to the latest version of a dependency?

The problem I have solved today happened with Rails 2.1.1 and a "version" of the will_paginate plugin I installed in May 2008.

Here is an extract of the stacktrace so google can index the information which will help other people to solve this problem quicker than I did ;-)

SystemStackError: stack level too deep
vendor/plugins/will_paginate/lib/will_paginate/finder.rb:92:in `method_missing_without_paginate'
vendor/plugins/will_paginate/lib/will_paginate/finder.rb:93:in `method_missing'


Googling "Rails 2.1 acts_as_taggable"", I found in a german blog the solution:

As I also use the will_paginate plugin and there are known stack level too depp problems with the old version of it, I tried to change it for the “Mislav” version of will_paginate and it solved the problem!

will_paginate is now on github: http://github.com/mislav/will_paginate/

To conclude, we should always try to specify the version of the dependencies through Rails 2.1.x sytem or the more mature gemsintaller, which has a better spec coverage.

To solve the problem of plugins stability , I am dreaming about a Continuous Integration farm of CruiseControl.rb running different versions of Rails and testing with selenium-grid the plugins ...

This would increase a *lot* the productivity of the Rails community, the plugins which would pass the tests of the "Farm" could be stamped "enterprise" ;-)



1 comment:

Unknown said...

A big Thanks!. You saved my day.