Topic: Question about plugin load order and config.plugins
I have been successfully using the acts_as_taggable_on_steroids for a while. I am now trying to use it in conjunction with the permalink_fu plugin.
Following the documentation, I added has_permalink :name to my tag.rb file.
The problem is that it appears by default Rails loads plugins in alphabetical order so acts_as_taggable... returns an error because it does not know what to do with the has_permalink call.
The only way I was able to get this to work was to add extend PermalinkFu to the top of my Tag class definition. I also had to put a copy of permalink_fu.rb in the same directory as tag.rb.
There must be a better way, no?
I found something in the Rails Trac (bug #6851) that says I should be able to add an array of plugins to config.plugins in environment.rb and Rails will load the plugins in the order they are listed in the array.
I cannot get this to work.
When I try to start my server, I get this:
=> Booting Mongrel (use 'script/server webrick' to force WEBrick)
=> Rails application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
** Starting Mongrel listening at 0.0.0.0:3000
** Starting Rails with development environment...
b/commands/servers/mongrel.rb:15: warning: already initialized constant OPTIONS
b/commands/servers/mongrel.rb:18: undefined method `options' for :Array (NoMet
This happens even when I list all my plugins in alphabetical order -- the same order they are being loaded by default.