Hi,
I have a script that loads a couple of cap configurations and fires
off various tasks using the capistrano apis directly. The
configurations both leverages the mongel_cluster recipes. The first
loaded config execute the tasks correctly, however the second loaded
configuration doesn't seem to know about any of the mongel_cluster
tasks.
My setup...
- config1.rb
require 'mongrel_cluster/recipes'
vars + tasks
- config2.rb
require 'mongrel_cluster/recipes'
vars + tasks
- cap_script.rb
cap1 = Capistrano::Configuration.new
cap1.load( .../config1 )
cap2 = Capistrano::Configuration.new
cap2.load( .../config2 )
cap1.configure_mongrel_cluster
cap2.configure_mongrel_cluster <= Error unable to find method
configure_mongrel_cluster ?
My guess is since both config use require to load the mongrel
recipes the first configuration gets correctly loaded as this is the
first time the require would be loaded. But on the second load the
require will not load the mongrel recipes since they have already been
loaded ? Hence the second configuration fails to locate
configure_mongrel_cluster...
Thanks for your help Jamis...
-Fernand