Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #9367 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

Capistrano: Configuration partially loaded using cap APIs

Reported by: Fernand Assigned to: jamis
Priority: normal Milestone: 1.x
Component: Capistrano Version: edge
Severity: normal Keywords:
Cc:

Description

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

Change History

09/01/07 14:35:33 changed by minam

  • status changed from new to closed.
  • resolution set to fixed.

(In [7389]) Allow independent configurations to require the same recipe file (closes #9367)