On Wed, Jun 18, 2008 at 8:49 AM, Slant <[EMAIL PROTECTED]> wrote:
>
> I'm taking over a project and am wanting to put a staging server in
> place.
>
> The thing holding me up is the Capistrano deploy scripts.  I have
> changed the 'deploy.rb' file to 'deploy-production.rb' and then added
> a 'deploy-stage.rb' file.
>
> Here is where I believe my problem is coming into play:
> The current contents of my 'Capfile':
>
> load 'deploy' if respond_to?(:namespace) # cap2 differentiator
> Dir['vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) }
> load 'config/deploy-stage'
> load 'config/deploy-production'
>
> This was a shot in the dark (adding the last two lines).  Am I
> misunderstanding what that load line does?  Here's is why I'm
> confused.  After modifying the file as such, I then go to the command
> line and attempt to run the stage script with 'cap -f config/deploy-
> stage.rb deploy'.  I then receive a lovely message telling me that
> "the task `deploy' does not exist".  Whaaa?  Well, we know it does, so
> this must be caused by the Capfile no longer being included.  I
> thought I read in the documentation that if '-f' is used even once, it
> will negate the Capfile's inclusion.
>
> So I suppose I'm looking for some direction here.  A seemingly ideal
> solution would be to create a task such as 'cap deploy:stage' and 'cap
> deploy:production' in order to deploy to stage.  Is this a bad idea?
> How would I go about doing this?

My understanding is that calling:

RAILS_ENV='staging' && cap deploy

should do it. Maintaining two versions of basically the same file goes
against the DRY principle.



-- 
Anthony Ettinger
408-656-2473
http://anthony.ettinger.name

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Deploying Rails" group.
To post to this group, send email to rubyonrails-deployment@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-deployment?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to