You need to load #{RAILS_ROOT}/Capfile, not
#{RAILS_ROOT}/config/deploy.rb. Capfile loads both the default deploy
recipes, as well as your app's deploy.rb

- Jamis

On 2/12/09 7:23 PM, Michael Guymon wrote:
> Hello Capistranians,
> 
> I am trying to trigger a deploy from a Rails app using
> Capistrano::CLI, similar to what Webistrano is doing. I have a test
> cap file - http://pastie.org/private/kmpdjoufaaw1dz2iwoga that works
> using 'cap staging deploy' but when attempting to run it directly in
> the rails instance, gives the error 'the task `deploy' does not exist'
> 
> The execution of 'staging mmd:echo' does work in the rails instance,
> and dumps out the variables, namespaces, and tasks information.
> 
> Calling the deploy in rails happens by a lib that includes
> Capistrano::CLI::Execute, Capistrano::CLI::Options,
> setting  the @option
> 
> @options = {
>         :recipes => ['/absolute/path/to/deploy.rb'],
>         :actions => ['staging', 'deployer'], # or ['staging',
> 'mmd:echo']
>         :vars => [],
>         :pre_vars => {},
>         :verbose => 3 }
> 
> and calling
> 
>          config = instantiate_configuration
>          set_pre_vars(config)
>          load_recipes(config)
> 
>          config.trigger(:load)
>          execute_requested_actions(config)
>          config.trigger(:exit)
> 
> which run successfully for 'staging mmd:echo', but fails for 'staging
> deploy'
> 
> Any help would be greatly appreciated.
> 
> thanks,
> Michael
> 
> Below is the ouput of the mmd:echo task, which is the same for
> manually runing cap and running in rails
> 
> -- variables --
>   ssh_options: Hash.class
>   logger: Capistrano::Logger.class
>   default_environment: Hash.class
>   default_run_options: Hash.class
>   password: cap test password
>   username: cap test user
>   scm: subversion
>   keep_releases: Fixnum.class
>   runner: Proc.class
>   application: test app
>   user: user
>   repository: a repo
>   scm_username: scm username
>   scm_password: scm password
>   dbuser: dbuser
>   dbpass: dbpass
> ---------------
> 
> -- tasks --
>   invoke
>   shell
>   staging
> ----------------
> 
> -- namespaces --
>   ey_logger
>   db
>   ferret
>   mongrel
>   nginx
>   slice
>   deploy
>   sphinx
>   acts_as_sphinx
>   thinking_sphinx
>   ultrasphinx
>   bdrb
>   memcached
>   solr
>   monit
>   tomcat
>   juggernaut
>   passenger
>   apache
>   mmd
> ----------------
> 
> > 


--~--~---------~--~----~------------~-------~--~----~
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