Use the sudo() helper instead of run():

  sudo "mongrel_rails ..."

That'll prompt for the password correctly.

- Jamis

On Sep 2, 2008, at 7:39 PM, LeeRoy wrote:


I understand your idea,
but it move the problem and not resolve it... not yet

I can't do this because I need to be root to run mongrel_rails, and I
need to be root to run mongrel with a special user
when I run:
task :start, :roles => :app do
 run "sudo mongrel_rails cluster::start -C /etc/mongrel_cluster/
viniway.yml"
end

I have:
*** [err :: mysite.com] [sudo] password for lunix_user:

Do you know if I could give to "run" my password?

On 1 sep, 10:10, "Rafael G." <[EMAIL PROTECTED]> wrote:
Rewrite start, stop and restart tasks for works with mongrel and use
mongrel_cluster.yml.
This will solve the problem (without spawner script), example:

namespace :deploy do
  desc "Modified start task for work ONLY with mongrel cluster"
  task :start, :roles => :app do
    run "mongrel_rails cluster::start -C
#{deploy_to}/current/config/mongrel_cluster.yml"
  end
  ...      # same stuff for stop and restart
end

If you had latest mongrel you can use --clean parameter too (clean pid
files).

LeeRoy escribió:



Everything is in the title
... but I'll explain.

I use my rails application in production 1 month ago, but I install
capistrano now.
My problem is when I try to start with "cap deploy:start". I have not
error message but, on the server, mongrel process have a short life.
And when I compare the actual ps with old one I see user and group
options are not define.

I trought to change script/spin like it, but it doesn't change
anything

 /path/current/script/process/spawner \
  mongrel \
  --user=apache-user \
  --group=apache-group \
  --environment=production \
  --instances=3 \
  --address=127.0.0.1 \
  --port=8000

It the reason why i ask "how to configure user and group in script/
spin".

Thank you for reading

--
Rafael Garcia Ortega

 rgo.vcf
< 1KViewDownload

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


Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to