On Jan 17, 2007, at 12:30 AM, Mike Bailey wrote:


I'm curious about why a recipe file I "require" in ~/.caprc is not loaded a second
time when it is "require"d by deploy.rb

I noticed this when investigating a problem with ~/.caprc not overriding standard
tasks ('fcgi not found' appeared in place of restart_mongrel_cluster).

When I removed 'require deprec/recipes' from ~/.caprc, it was loaded by deploy.rb and the :restart task was overwritten. However when it was in ~/.caprc the :restart
task was not overwritten.

Is there someone stopping a recipe file from being loaded twice?

- Mike


Mike-

You can require the same file multiple times in one ruby program but it will only ever be loaded once. If you want it to load twice use load instead of require.

so

load 'deploy.rb'

instead of

require 'depoy'

the .rb is necessary with load.

Cheers-
-- Ezra Zygmuntowicz -- Lead Rails Evangelist
-- [EMAIL PROTECTED]
-- Engine Yard, Serious Rails Hosting
-- (866) 518-YARD (9273)



--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---

Reply via email to