Hi,

I'm trying to do a simple thing with Capistrano: run multiple commands
in one shell session as a different user. For example: "cd #
{latest_release}; bin/merb #{merb_options}".

This works with run (e.g. run "cd #{latest_release}; bin/merb #
{merb_options}"), but it doesn't work with sudo and invoke_command. I
tried:
- sudo "#{sudo :as => 'mongrel'} cd #{latest_release}; bin/merb #
{merb_options}"
- invoke_command "cd #{latest_release}; bin/merb #
{merb_options}", :via => run_method, :as => "#{mongrel_user}"

And I get errors from the shell: "sudo: cd: command not found , sh:
bin/merb: No such file or directory".

Note that I cannot user "#{latest_release}/bin/merb#{merb_options}".

Thanks,
Tiberiu
--~--~---------~--~----~------------~-------~--~----~
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