Problem solved!
set :dwd, "#{latest_release}/drupal" must be set :dwd, lambda {
"#{latest_release}/drupal" }
Why?
After going through basically all of my code with Lee, the problem ended up
being in my Capfile ( http://pastie.org/1174485 )
Specifically, it was:
set :dwd, "#{latest_release}/drupal"
latest_release is a macro that attempts to connect to your server to
get its information; you can see this here (
http://github.com/capistrano/capistrano/blob/master/lib/capistrano/recipes/deploy.rb#L59
)
Since this is executed before capistrano knows about my server
information, I was receiving the following error(s):
* executing "ls -x /u/apps/myapp/releases"
no servers found to match {:once=>true}
(This makes sense now that I know what latest_release does :)
Making :dwd a lambda function allows :dwd to only be called when
needed instead of blowing up right away (thanks again for this, Lee!)
Hope this saves someone time in the future.
Joe
On Wed, Sep 22, 2010 at 3:52 PM, Lee Hambley <[email protected]> wrote:
> Joe, it looks like it - I think partly the problem is that you have to have
> all your variables defined before you load additional files - that does
> happen from time to time, try moving your requires until as late as possible
> (read: all varaibles are defined)
>
> If you want to take this offlist, and catch me in IRC, maybe this is better
> worked through itteratively? ( or approach the blog author? )
>
> - Lee
>
>
> On 22 September 2010 21:44, E.J. Hassick <[email protected]> wrote:
>
>> I hard coded the server name in the server method within my separate
>> staging files, but cap still doesn't recognize anything. Do I need
>> something that has to do with server information within the Capfile or the
>> deploy.rb file? All I have in my deploy.rb file is a few tasks. All of the
>> common/shared information is in my Capfile and the server information is
>> separated between the different stage files.
>>
>> There's definitely something very small that I am missing here..
>>
>>
>>
>> Joe
>>
>> On Wed, Sep 22, 2010 at 3:36 PM, Lee Hambley <[email protected]>wrote:
>>
>>> Joe, I didn't expect to see it done that way, there's a good chance you
>>> need to do it without using variable interpolation, as the order in which
>>> files are processed may mean you can't do that without resorting to using
>>> lambdas (lame, I know)
>>>
>>> (and I don't recall anyone ever having tried)
>>>
>>> - Lee
>>>
>>> --
>>> * You received this message because you are subscribed to the Google
>>> Groups "Capistrano" group.
>>> * To post to this group, send email to [email protected]
>>> * To unsubscribe from this group, send email to
>>> [email protected]<capistrano%[email protected]>For
>>> more options, visit this group at
>>> http://groups.google.com/group/capistrano?hl=en
>>>
>>
>> --
>> * You received this message because you are subscribed to the Google
>> Groups "Capistrano" group.
>> * To post to this group, send email to [email protected]
>> * To unsubscribe from this group, send email to
>> [email protected]<capistrano%[email protected]>For
>> more options, visit this group at
>> http://groups.google.com/group/capistrano?hl=en
>>
>
> --
> * You received this message because you are subscribed to the Google Groups
> "Capistrano" group.
> * To post to this group, send email to [email protected]
> * To unsubscribe from this group, send email to
> [email protected]<capistrano%[email protected]>For
> more options, visit this group at
> http://groups.google.com/group/capistrano?hl=en
>
--
* You received this message because you are subscribed to the Google Groups
"Capistrano" group.
* To post to this group, send email to [email protected]
* To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/capistrano?hl=en