active_scaffold_acts_as_list issue with template_search_path

Posted on November 25, 2007 
Filed Under Ruby on Rails

These days I am making an application using Active Scaffold.

I needed to have reordering functionality in my application and found a plugin for the same called "active_scaffold_acts_as_list". Getting it to work was really a tricky part. I kept on getting errors while starting my server:

/vendor/plugins/active_scaffold_acts_as_list/init.rb:5:in
`load’: wrong number of arguments (1 for 0) (ArgumentError)

After trying to look for a solution to this I first tried changing load with require and now I was getting a new error:

/vendor/rails/activesupport/lib/active_support/core_ext/module/aliasing.rb:
31:in `alias_method’: undefined method `template_search_path’
for class `Class’(NameError)

I was in doubt of this new problem being coming due to using require hence I tried looking for why load was not working and found that Rails::Plugin::Loader has already defined load method so a way to over come that was to use:

Kernel::load ‘config/core.rb’

I tried several things and thought that may be Active Scaffold was not getting loaded before active_scaffold_acts_as_list hence I tried to find out about the new feature I had heard recently in Rails on edge for specifying order or sequence for loading plguins.

I found a very useful article and even went through change logs on Rails trac after which I made changes to my environment.rb accordingly. But hard luck again it dint work :(

So I finally I went to Active Scaffold Google group and searched the discussion forum and found a thread that saved my life :)

It was more of a patch for fixing the exact problem I was facing and I followed what was suggested and viola now its working!!

Comments

Leave a Reply