Forum: Ferret How to restart ferret_server using Capistrano?

Fcd10a0753a1f719d6e9aadc4c20c73f?d=identicon&s=25 Collin Vandyck (cvandyck)
on 2008-01-08 00:28
This is a ferret question. I have the ferret_server DRb server up and
running, but I'm trying to get it so that I can restart the ferret
server through Capistrano whenever I restart the Mongrel processes. Not
having a lot of luck with this at the bottom of my deploy.rb:

task :post_deployment do
  run "cd /home/site.com/web/rails/current/ && script/ferret_server -e
production stop"
  run "cd /home/site.com/web/rails/current/ && script/ferret_server -e
production start"
end
after 'deploy:restart', :post_deployment


After the restart it tries to execute the stop and then start, but
fails:

** [out :: site.com@site.com] no such file to load --
/usr/bin/../config/environment
    command finished

So it looks like it's not respecting the current directory. Any ideas on
how to get around this? I have to restart the DRb ferret_server each
time so that it restarts using the most recent version of the rails app
that I just deployed.
2119f016588ba13373484491bd2dd6d1?d=identicon&s=25 Joe Peck (fatcatt316)
on 2008-02-07 21:01
I'm trying to do this, too.  I can SSH into the server and restart Drb
manually, but there's gotta be some easy way to do this with Capistrano,
probably in deploy.  Does anyone know how to do this?
561a3a55352fe6a5343e541a6894b541?d=identicon&s=25 aa bb (bbnnt)
on 2008-09-09 00:15
Joe Peck wrote:
> I'm trying to do this, too.  I can SSH into the server and restart Drb
> manually, but there's gotta be some easy way to do this with Capistrano,
> probably in deploy.  Does anyone know how to do this?

there might be this, :

before "deploy:start" do
  run "#{current_path}/script/ferret_server -e production start"
end

after "deploy:stop" do
  run "#{current_path}/script/ferret_server -e production stop"
end

after 'deploy:restart' do
  run "cd #{current_path} && ./script/ferret_server -e production stop"
  run "cd #{current_path} && ./script/ferret_server -e production start"
end

but it throws me errors saying that I don't have permissions…
This topic is locked and can not be replied to.