Capistrano Deploy Error

2 views
Skip to first unread message

PortlandOnRails.com

unread,
May 29, 2008, 3:45:41 AM5/29/08
to PeepCode
Hello! Thank you for all of the wonderful Rails resources. I'm having
a problem with one of my Capistrano deployments. It's worked before in
the past,
but when I do

cap deploy:cold i get this error:

* executing `deploy:start'
* executing "sh -c 'cd /var/www/apps/iwalkthevine.com/current &&
nohup script/spin'"
servers: ["iwalkthevine.com"]
[iwalkthevine.com] executing command
*** [err :: iwalkthevine.com] nohup: cannot run command `script/spin':
Permission denied
command finished
command "sh -c 'cd /var/www/apps/iwalkthevine.com/current && nohup
script/spin'" failed on iwalkthevine.com

and then

cap deploy:migrations I get an error near the bottom:

* executing `deploy:restart'
* executing "/var/www/apps/iwalkthevine.com/current/script/process/
reaper"
servers: ["iwalkthevine.com"]
[iwalkthevine.com] executing command
*** [err :: iwalkthevine.com] Couldn't find any pid file in '/var/www/
apps/iwalkthevine.com/releases/20080529072111/tmp/pids' matching
'dispatch.[0-9]*.pid'
*** [err :: iwalkthevine.com] (also looked for processes matching "/
var/www/apps/iwalkthevine.com/releases/20080529072111/public/
dispatch.fcgi")
command finished

I can still access the rails app at http://iwalkthevine.com so I know
that it's up and running, but it's not showing any of the updates I've
done. Has anyone seen this error, and can you please help me out?

Thank you,
Jason
PortlandonRails.com

topfunky

unread,
May 29, 2008, 12:25:27 PM5/29/08
to PeepCode
On May 29, 12:45 am, "PortlandOnRails.com" <schmidt...@gmail.com>
wrote:
> Hello! Thank you for all of the wonderful Rails resources. I'm having
> a problem with one of my Capistrano deployments.
> *** [err :: iwalkthevine.com] nohup: cannot run command `script/spin':
> Permission denied

It appears that the script/spin file doesn't exist or is not
executable. You could copy this to deploy.rb and run it with "cap
examine_spin". (Or, go to the server and look at the file)

desc "Print the attributes of scripts"
task :examine_spin do
run "ls -l #{current_path}/script"
end

You should see something like: -rwxrwxr-x

-rwxrwxr-x 1 deploy deploy 166 May 22 19:44 /app/current/script/
spin

If it doesn't exist at all, you may need to create it on every deploy.
My PeepServer plugin does this automatically:

http://topfunky.net/svn/plugins/peepserver/

> cap deploy:migrations I get an error near the bottom:
> *** [err :: iwalkthevine.com] Couldn't find any pid file in '/var/www/
> apps/iwalkthevine.com/releases/20080529072111/tmp/pids' matching
> 'dispatch.[0-9]*.pid'

Usually this is just a notification and is not fatal. It sounds like
the problem is with restarting the application with script/spin as
mentioned above.

Geoffrey Grosenbach
http://peepcode.com

PortlandOnRails.com

unread,
May 29, 2008, 12:51:55 PM5/29/08
to PeepCode
Thank you for the quick reply. I am using your peepserver plugin. That
is why I found it weird that is was giving an error about the script/
spin.
Here is what I got when I ran "cap examine_spin":

** [out :: iwalkthevine.com] -rw-r--r-- 1 deploy deploy 158 May 29
07:45 spin

It looks like it's not writable, or executable. How can I change that?

Thank you

PortlandOnRails.com

unread,
May 29, 2008, 7:46:11 PM5/29/08
to PeepCode
I'm still getting the same error:
* executing `deploy:start'
* executing "sh -c 'cd /var/www/apps/iwalkthevine.com/current &&
nohup script/spin'"
servers: ["iwalkthevine.com"]
[iwalkthevine.com] executing command
*** [err :: iwalkthevine.com] nohup: cannot run command `script/spin':
Permission denied
command finished
command "sh -c 'cd /var/www/apps/iwalkthevine.com/current && nohup
script/spin'" failed on iwalkthevine.com


Geoffrey,
If I''m using the peepserver plugin, and it's still giving this error,
how can I fix the permissions so it won't give me the Permission
denied notice?
Thanks so much.
Jason

On May 29, 9:51 am, "PortlandOnRails.com" <schmidt...@gmail.com>
wrote:

topfunky

unread,
Jun 12, 2008, 4:19:53 PM6/12/08
to PeepCode
On May 29, 4:46 pm, "PortlandOnRails.com" <schmidt...@gmail.com>
wrote:
> I'm still getting the same error:
> *** [err :: iwalkthevine.com] nohup: cannot run command `script/spin':
> Permission denied

I've occasionally seen this, but haven't figured out the root problem.
In the meantime, a hack would be to manually make the script/spin
executable:

desc "Make spin script executable"
task :make_spin_script_executable, :roles => :app do
run "cd #{current_path} && chmod +x script/spin"
end
before "deploy:start", "make_spin_script_executable"

Geoffrey Grosenbach
http://peepcode.com
Reply all
Reply to author
Forward
0 new messages