Capistrano current_path set to /u/app for some commands - ruby-on-rails

I've set the deploy_to variable to the necessary path, but Capistrano runs a single task in the u/app/ directory.
Here is the task that is run
executing "cat /u/apps/application/current/REVISION"
That is how variables are set
set :application, "application"
set :deploy_to, "normal_path/#{application}"
Part of the log where it happens is here:
* executing "cat /normal_path/applicaiton/TOUCH_ASSETS | while read asset; do touch -cm -- \"$asset\"; done && rm -f -- /normal/TOUCH_ASSETS"
servers: ["1.1.1.1"]
[1.1.1.1] executing command
command finished in 992ms
* executing "cat /u/apps/application/current/REVISION"
servers: ["1.1.1.1"]
[1.1.1.1] executing command
command finished in 427ms
*** [deploy:update_code] rolling back
* executing "rm -rf /normal_path/applicaiton/releases/20130610233146; true"
servers: ["1.1.1.1", "1.1.1.2"]
[1.1.1.1] executing command
[1.1.1.1] executing command
command finished in 486ms
failed: "sh -c 'cat /u/apps/application/current/REVISION'" on 1.1.1.1
Why does Capistrano use the wrong path?

Related

rubber fails in 'deploy:update_code'

Trying to deploy a simple rails to staging on ec2 with rubber. Process fails with following error. Have been trying for days to find a solution but can't figure it out.
Anyone know why it fails?
* 2014-03-05 15:20:13 executing `deploy:setup'
* executing "sudo -p 'sudo password: ' mkdir -p /mnt/bott.ly-production /mnt/bott.ly-production/releases /mnt/bott.ly-production/shared /mnt/bott.ly-production/shared/system /mnt/bott.ly-production/shared/log /mnt/bott.ly-production/shared/pids"
servers: ["staging.bott.ly"]
[staging.bott.ly] executing command
command finished in 1134ms
* executing "sudo -p 'sudo password: ' chmod g+w /mnt/bott.ly-production /mnt/bott.ly-production/releases /mnt/bott.ly-production/shared /mnt/bott.ly-production/shared/system /mnt/bott.ly-production/shared/log /mnt/bott.ly-production/shared/pids"
servers: ["staging.bott.ly"]
[staging.bott.ly] executing command
command finished in 1439ms
triggering after callbacks for `rubber:bootstrap'
* 2014-03-05 15:20:17 executing `rubber:collectd:bootstrap'
* executing "echo $(grep Rubber /etc/collectd/collectd.conf 2> /dev/null)"
servers: ["staging.bott.ly"]
[staging.bott.ly] executing command
command finished in 1208ms
* 2014-03-05 15:20:20 executing `deploy:setup'
* executing "sudo -p 'sudo password: ' mkdir -p /mnt/bott.ly-production /mnt/bott.ly-production/releases /mnt/bott.ly-production/shared /mnt/bott.ly-production/shared/system /mnt/bott.ly-production/shared/log /mnt/bott.ly-production/shared/pids"
servers: ["staging.bott.ly"]
[staging.bott.ly] executing command
command finished in 1187ms
* executing "sudo -p 'sudo password: ' chmod g+w /mnt/bott.ly-production /mnt/bott.ly-production/releases /mnt/bott.ly-production/shared /mnt/bott.ly-production/shared/system /mnt/bott.ly-production/shared/log /mnt/bott.ly-production/shared/pids"
servers: ["staging.bott.ly"]
[staging.bott.ly] executing command
command finished in 269ms
** updating code for bootstrap
* 2014-03-05 15:20:24 executing `deploy:update_code'
* getting (via checkout) revision to C:/Users/solanmi/AppData/Local/Temp/20140305142024
executing locally: xcopy . "C:/Users/solanmi/AppData/Local/Temp/20140305142024" /S/I/Y/Q/E
378 File(s) copied
command finished in 4328ms
* processing exclusions...
* Compressing C:/Users/solanmi/AppData/Local/Temp/20140305142024 to C:/Users/solanmi/AppData/Local/Temp/20140305142024.tar.gz
executing locally: tar czf 20140305142024.tar.gz 20140305142024
command finished in 51ms
shell command failed with return code pid 8760 exit 53
Looks like you are deploying from Windows and you may be missing the tar command locally or it's not in your $PATH
If you want to use Cygwin I recommend you install it using the it's Setup64 or Setup-x86 program. I believe the tar package is one of the default packages that get installed. If not you can find it here: http://gnuwin32.sourceforge.net/packages/gtar.htm

Getting a Pending Migrations error on my rails app after deployment

I've been trying to deploy my site to Webfaction from Github via Capistrano 2, and I've definitely made some progress.
Here's my repo: https://github.com/jaronoff/new_site
I'm trying to deploy to josharonoff.com
I finally have my deploy.rb the way I want it, and I checked cap deploy:status works fine, I run cap deploy and it works fine, but I for some reason am getting this error even though I've restarted via the deploy.rb file.
error:
ActiveRecord::PendingMigrationError at /
Migrations are pending; run 'bin/rake db:migrate RAILS_ENV=development' to resolve this issue.
When I run the cap deploy, the output I get says that it's deployed correctly, and even does the db migration to the rails env of production... so I'm not sure what I'm doing wrong.
Here's the output from the console when I run cap deploy:
* 2014-02-13 14:43:39 executing `deploy'
* 2014-02-13 14:43:39 executing `deploy:update'
** transaction: start
* 2014-02-13 14:43:39 executing `deploy:update_code'
updating the cached checkout on all servers
executing locally: "git ls-remote git#github.com:jaronoff/new_site.git master"
command finished in 2251ms
* executing "if [ -d /home/jaronoff/webapps/ac_site/shared/cached-copy ]; then cd /home/jaronoff/webapps/ac_site/shared/cached-copy && git fetch -q origin && git fetch --tags -q origin && git reset -q --hard 3b7d990f32d1fa2bdb7153d1c00548fec510eb33 && git clean -q -d -x -f; else git clone -q -b master git#github.com:jaronoff/new_site.git /home/jaronoff/webapps/ac_site/shared/cached-copy && cd /home/jaronoff/webapps/ac_site/shared/cached-copy && git checkout -q -b deploy 3b7d990f32d1fa2bdb7153d1c00548fec510eb33; fi"
servers: ["web432.webfaction.com"]
[web432.webfaction.com] executing command
command finished in 1956ms
copying the cached version to /home/jaronoff/webapps/ac_site/releases/20140213194344
* executing "cp -RPp /home/jaronoff/webapps/ac_site/shared/cached-copy /home/jaronoff/webapps/ac_site/releases/20140213194344 && (echo 3b7d990f32d1fa2bdb7153d1c00548fec510eb33 > /home/jaronoff/webapps/ac_site/releases/20140213194344/REVISION)"
servers: ["web432.webfaction.com"]
[web432.webfaction.com] executing command
command finished in 233ms
* 2014-02-13 14:43:44 executing `deploy:finalize_update'
* executing "chmod -R -- g+w /home/jaronoff/webapps/ac_site/releases/20140213194344 && rm -rf -- /home/jaronoff/webapps/ac_site/releases/20140213194344/public/system && mkdir -p -- /home/jaronoff/webapps/ac_site/releases/20140213194344/public/ && ln -s -- /home/jaronoff/webapps/ac_site/shared/system /home/jaronoff/webapps/ac_site/releases/20140213194344/public/system && rm -rf -- /home/jaronoff/webapps/ac_site/releases/20140213194344/log && ln -s -- /home/jaronoff/webapps/ac_site/shared/log /home/jaronoff/webapps/ac_site/releases/20140213194344/log && rm -rf -- /home/jaronoff/webapps/ac_site/releases/20140213194344/tmp/pids && mkdir -p -- /home/jaronoff/webapps/ac_site/releases/20140213194344/tmp/ && ln -s -- /home/jaronoff/webapps/ac_site/shared/pids /home/jaronoff/webapps/ac_site/releases/20140213194344/tmp/pids"
servers: ["web432.webfaction.com"]
[web432.webfaction.com] executing command
command finished in 254ms
* executing "find /home/jaronoff/webapps/ac_site/releases/20140213194344/public/images /home/jaronoff/webapps/ac_site/releases/20140213194344/public/stylesheets /home/jaronoff/webapps/ac_site/releases/20140213194344/public/javascripts -exec touch -t 201402131943.44 -- {} ';'; true"
servers: ["web432.webfaction.com"]
[web432.webfaction.com] executing command
** [out :: web432.webfaction.com] find: `/home/jaronoff/webapps/ac_site/releases/20140213194344/public/images': No such file or directory
** [out :: web432.webfaction.com] find: `/home/jaronoff/webapps/ac_site/releases/20140213194344/public/stylesheets': No such file or directory
** [out :: web432.webfaction.com] find: `/home/jaronoff/webapps/ac_site/releases/20140213194344/public/javascripts': No such file or directory
command finished in 195ms
* 2014-02-13 14:43:45 executing `deploy:create_symlink'
* executing "rm -f /home/jaronoff/webapps/ac_site/current && ln -s /home/jaronoff/webapps/ac_site/releases/20140213194344 /home/jaronoff/webapps/ac_site/current"
servers: ["web432.webfaction.com"]
[web432.webfaction.com] executing command
command finished in 198ms
** transaction: commit
* 2014-02-13 14:43:45 executing `deploy:restart'
triggering before callbacks for `deploy:restart'
* 2014-02-13 14:43:45 executing `deploy:migrate'
* executing "cd /home/jaronoff/webapps/ac_site/releases/20140213194344 && rake RAILS_ENV=production db:migrate"
servers: ["web432.webfaction.com"]
[web432.webfaction.com] executing command
command finished in 1939ms
* executing "/home/jaronoff/webapps/ac_site/bin/restart"
servers: ["web432.webfaction.com"]
[web432.webfaction.com] executing command
command finished in 3217ms
Any help or anything would be greatly appreciated. I've gotten pretty far today just by trial and error.
Thanks in advance!!
~Josh

Capistrano Attempting To Create /public Directory

I'm currently in the process of attempting my first Rails deployment using Capistrano, and I've run into a roadblock I haven't been able to overcome. During the cap deploy I'm getting an error "mkdir: cannot create directory/public'`".
Pertinent Details:
Rails Version: 3.2.6
Capistrano Version: 2.13.5
Running on Dreamhost
I'm precompiling my assets (I suspect this is part of the problem), so I've got load 'deploy/assets' in my Capfile.
I've followed the directions here: http://wiki.dreamhost.com/Capistrano for the most part, as well as scouring the web for a number of other articles on Capistrano.
deploy.rb
require "bundler/capistrano"
ssh_options[:forward_agent] = true
ssh_options[File.join(ENV["HOME"], ".ssh", "id_rsa-dreamhost")]
set :application, "<app>"
set :repository, "git#bitbucket.org:<gituser>/#{application}.git"
set :server_name, "<host>"
set :scm, :git # You can set :scm explicitly or Capistrano will make an intelligent guess based on known version control directory names
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none`
set :checkout, "export"
set :deploy_via, :remote_cache
set :branch, "master"
set :base_path, "/home/<user>/<domain>"
set :deploy_to, "#{base_path}/#{application}"
set :keep_releases, 3
set :user, '<user>'
set :runner, '<user>'
set :use_sudo, false
default_run_options[:pty] = true
set :shared_path, "/home/<user>/<shared_folder>"
set :release_path, "#{base_path}/#{application}"
role :web, "<host>" # Your HTTP server, Apache/etc
role :app, "<host>" # This may be the same as your `Web` server
role :db, "<host>", :primary => true # This is where Rails migrations will run
# if you want to clean up old releases on each deploy uncomment this:
# after "deploy:restart", "deploy:cleanup"
# if you're still using the script/reaper helper you will need
# these http://github.com/rails/irs_process_scripts
# If you are using Passenger mod_rails uncomment this:
namespace :deploy do
task :start do ; end
task :stop do ; end
desc "Restart the app by touching the restart.txt file."
task :restart, :roles => :app, :except => { :no_release => true } do
run "touch #{File.join(current_path,'tmp','restart.txt')}"
end
desc "Update the environment-specific files from the shared folder."
task :symlink_shared, :roles => [:app] do
run "ln -s #{shared_path}/app_config.yml #{release_path}/config/"
run "rm #{release_path}/config/database.yml"
run "ln -s #{shared_path}/database.yml #{release_path}/config/"
run "rm #{release_path}/public/.htaccess"
run "ln -s #{shared_path}/.htaccess #{release_path}/public/"
end
end
before "deploy:restart", "deploy:symlink_shared"
after "deploy:update_code", "deploy:migrate"
Output of cap deploy:setup
* 2012-12-23 16:49:27 executing `deploy:setup'
* executing "mkdir -p /home/<user>/<domain>/<app> /home/<user>/<domain>/<app>/releases /home/<user>/<shared_folder> /home/<user>/<shared_folder>/system /home/<user>/<shared_folder>/log /home/<user>/<shared_folder>/pids"
servers: ["<host>"]
[<host>] executing command
command finished in 263ms
* executing "chmod g+w /home/<user>/<domain>/<app> /home/<user>/<domain>/<app>/releases /home/<user>/<shared_folder> /home/<user>/<shared_folder>/system /home/<user>/<shared_folder>/log /home/<user>/<shared_folder>/pids"
servers: ["<host>"]
[<host>] executing command
command finished in 261ms
Output of cap deploy:check
* 2012-12-23 16:49:45 executing `deploy:check'
* executing "test -d /home/<user>/<domain>/<app>/releases"
servers: ["<host>"]
[<host>] executing command
command finished in 265ms
* executing "test -w /home/<user>/<domain>/<app>"
servers: ["<host>"]
[<host>] executing command
command finished in 256ms
* executing "test -w /home/<user>/<domain>/<app>/releases"
servers: ["<host>"]
[<host>] executing command
command finished in 256ms
* executing "which git"
servers: ["<host>"]
[<host>] executing command
command finished in 259ms
* executing "test -w /home/<user>/<shared_folder>"
servers: ["<host>"]
[<host>] executing command
command finished in 263ms
You appear to have all necessary dependencies installed
Output of cap:deploy
* 2012-12-23 16:51:41 executing `deploy'
* 2012-12-23 16:51:41 executing `deploy:update'
** transaction: start
* 2012-12-23 16:51:41 executing `deploy:update_code'
updating the cached checkout on all servers
executing locally: "git ls-remote git#bitbucket.org:<gituser>/<app>.git master"
command finished in 1102ms
* executing "if [ -d /home/<user>/<shared_folder>/cached-copy ]; then cd /home/<user>/<shared_folder>/cached-copy && git fetch -q origin && git fetch --tags -q origin && git reset -q --hard 42dfb6a3f529e2293192f5e22c3214b7da55c9b4 && git clean -q -d -x -f; else git clone -q git#bitbucket.org:<gituser>/<app>.git /home/<user>/<shared_folder>/cached-copy && cd /home/<user>/<shared_folder>/cached-copy && git checkout -q -b deploy 42dfb6a3f529e2293192f5e22c3214b7da55c9b4; fi"
servers: ["<host>"]
[<host>] executing command
command finished in 3233ms
copying the cached version to /home/<user>/<domain>/<app>
* executing "cp -RPp /home/<user>/<shared_folder>/cached-copy /home/<user>/<domain>/<app> && (echo 42dfb6a3f529e2293192f5e22c3214b7da55c9b4 > /home/<user>/<domain>/<app>/REVISION)"
servers: ["<host>"]
[<host>] executing command
command finished in 338ms
* 2012-12-23 16:51:47 executing `deploy:finalize_update'
triggering before callbacks for `deploy:finalize_update'
* 2012-12-23 16:51:47 executing `deploy:assets:symlink'
* executing "ls -x /home/<user>/<domain>/<app>/releases"
servers: ["<host>"]
[<host>] executing command
command finished in 252ms
* executing "rm -rf /public/assets &&\\\n mkdir -p /public &&\\\n mkdir -p /home/<user>/<shared_folder>/assets &&\\\n ln -s /home/<user>/<shared_folder>/assets /public/assets"
servers: ["<host>"]
[<host>] executing command
** [out :: <host>] mkdir: cannot create directory `/public'
** [out :: <host>] : Permission denied
command finished in 268ms
*** [deploy:update_code] rolling back
* executing "rm -rf /home/<user>/<domain>/<app>; true"
servers: ["<host>"]
[<host>] executing command
command finished in 265ms
failed: "sh -c 'rm -rf /public/assets &&\\\n mkdir -p /public &&\\\n mkdir -p /home/<user>/<shared_folder>/assets &&\\\n ln -s /home/<user>/<shared_folder>/assets /public/assets'" on <host>
You can see the Permission denied error near the bottom of the output, as well as the failed shell command at the end. I can't figure out why it is attempting to do anything with /public, as I would expect a relative path to public in my web folder, rather than referring to what appears to be a public folder on root. I feel like I'm missing a variable reference somewhere which should get prepended to the mkdir command, but none of of the documentation I've read indicates this.
I'd appreciate any help I can get, and thanks in advance.
Please don't set release_path and shared_path by yourself. Let Capistrano figure it out automatically.
But you should set deploy_to correctly:
set :deploy_to, "/home/<user>/<domain>/<application>"
Also be careful with variables. The set syntax of Capistrano doesn't mean the variables are available for substitution. Your problem occurs because of "#{base_path}/" is nil and evalutates to "/".
Find out more on the configuration wiki of Capistrano.

Cap Deploy Issues with Rails 3.1.1 and Site5

I have a Rails 3.1.1 app that I am trying to deploy via Capistrano. This is my first attempt at this and I have worked through several issues by doing a lot of research, but I have hit a wall that I can not figure out a way to scale.
I can run cap deploy:setup and cap deploy:check without incident. When I try and run cap deploy this is what I get see bottom (separated text concerning the rake 0.9.2.2 and the failed line at the bottom)
Aaron-Johnsons-Macbook-Pro:webd2 aaronjohnsonis$ cap deploy *
executing deploy' * executingdeploy:update' ** transaction:
start * executing deploy:update_code'
updating the cached checkout on all servers
executing locally: "git ls-remote git#github.com:webdsquared/webd2.git master"
command finished in 2351ms * executing "if [ -d /home/webdsqua/apps/webd2/shared/cached-copy ]; then cd
/home/webdsqua/apps/webd2/shared/cached-copy && git fetch origin &&
git fetch --tags origin && git reset --hard
28e67c5f7e1ed4612dffd2ac4fb287356f51ce3b && git submodule init && for
mod ingit submodule status | awk '{ print $2 }'; do git config -f
.git/config submodule.${mod}.urlgit config -f .gitmodules --get
submodule.${mod}.url&& echo Synced $mod; done && git submodule sync
&& export GIT_RECURSIVE=$([ ! \"git --version\" \\< \"git version
1.6.5\" ] && echo --recursive) && git submodule update --init $GIT_RECURSIVE && git clean -d -x -f; else git clone --depth 1
git#github.com:webdsquared/webd2.git
/home/webdsqua/apps/webd2/shared/cached-copy && cd
/home/webdsqua/apps/webd2/shared/cached-copy && git checkout -b deploy
28e67c5f7e1ed4612dffd2ac4fb287356f51ce3b && git submodule init && git
submodule sync && export GIT_RECURSIVE=$([ ! \"git --version\" \\<
\"git version 1.6.5\" ] && echo --recursive) && git submodule update
--init $GIT_RECURSIVE; fi"
servers: ["webdsquared.com"] Password:
[webdsquared.com] executing command ** [webdsquared.com :: out] HEAD is now at 28e67c5 initial commit
command finished in 2428ms
copying the cached version to /home/webdsqua/apps/webd2/releases/20111104183017 * executing "cp
-RPp /home/webdsqua/apps/webd2/shared/cached-copy /home/webdsqua/apps/webd2/releases/20111104183017 && (echo
28e67c5f7e1ed4612dffd2ac4fb287356f51ce3b >
/home/webdsqua/apps/webd2/releases/20111104183017/REVISION)"
servers: ["webdsquared.com"]
[webdsquared.com] executing command
command finished in 2997ms * executingdeploy:finalize_update'
triggering before callbacks for deploy:finalize_update' * executingdeploy:assets:symlink' * executing "rm -rf
/home/webdsqua/apps/webd2/releases/20111104183017/public/assets &&\\n
mkdir -p /home/webdsqua/apps/webd2/releases/20111104183017/public
&&\\n mkdir -p /home/webdsqua/apps/webd2/shared/assets &&\\n
ln -s /home/webdsqua/apps/webd2/shared/assets
/home/webdsqua/apps/webd2/releases/20111104183017/public/assets"
servers: ["webdsquared.com"]
[webdsquared.com] executing command
command finished in 1104ms * executing "chmod -R g+w /home/webdsqua/apps/webd2/releases/20111104183017"
servers: ["webdsquared.com"]
[webdsquared.com] executing command
command finished in 119ms * executing "rm -rf /home/webdsqua/apps/webd2/releases/20111104183017/log
/home/webdsqua/apps/webd2/releases/20111104183017/public/system
/home/webdsqua/apps/webd2/releases/20111104183017/tmp/pids &&\\n
mkdir -p /home/webdsqua/apps/webd2/releases/20111104183017/public
&&\\n mkdir -p
/home/webdsqua/apps/webd2/releases/20111104183017/tmp &&\\n ln
-s /home/webdsqua/apps/webd2/shared/log /home/webdsqua/apps/webd2/releases/20111104183017/log &&\\n ln
-s /home/webdsqua/apps/webd2/shared/system /home/webdsqua/apps/webd2/releases/20111104183017/public/system &&\\n
ln -s /home/webdsqua/apps/webd2/shared/pids
/home/webdsqua/apps/webd2/releases/20111104183017/tmp/pids"
servers: ["webdsquared.com"]
[webdsquared.com] executing command
command finished in 3136ms
triggering after callbacks for deploy:update_code' * executingdeploy:assets:precompile' * executing "cd
/home/webdsqua/apps/webd2/releases/20111104183017 && rake
RAILS_ENV=production RAILS_GROUPS=assets assets:precompile"
servers: ["webdsquared.com"]
[webdsquared.com] executing command
** [out :: webdsquared.com] (in /home/webdsqua/apps/webd2/releases/20111104183017) ** [out >::
webdsquared.com] Could not find rake-0.9.2.2 in any of the sources
command finished in 1108ms
* [deploy:update_code] rolling back * executing "rm -rf /home/webdsqua/apps/webd2/releases/20111104183017; true"
servers: ["webdsquared.com"]
[webdsquared.com] executing command
**command finished in 113ms failed: "sh -c 'cd /home/webdsqua/apps/webd2/releases/20111104183017 && rake
RAILS_ENV=production RAILS_GROUPS=assets assets:precompile'" on
webdsquared.com**
My deploy.rb file looks like this...
set :application, "app"
set :repository, "git#github.com:webdsquared/app.git"
set :scm, "git"
set :deploy_to, "/home/username/apps/#{application}"
set :user, "username"
set :use_sudo, false
set :deploy_via, :remote_cache
set :keep_releases, 3
set :normalize_asset_timestamps, false
set :git_enable_submodules, 1
set :branch, "master"
set :git_shallow_clone, 1
set :scm_verbose, true
role :web, "webdsquared.com"
role :app, "webdsquared.com"
role :db, "webdsquared.com", :primary => true
after "deploy", "deploy:restart"
namespace :deploy do
task :start do ; end
task :stop do ; end
task :restart, :roles => :app, :except => { :no_release => true } do
run "touch #{File.join(current_path,'tmp','restart.txt')}"
end
end
The Capfile looks like this...
load 'deploy' if respond_to?(:namespace) # cap2 differentiator
Dir['vendor/gems/*/recipes/*.rb','vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) }
load 'config/deploy' # remove this line to skip loading any of the default tasks
Any advice would be most appreciated. Has anyone experienced the same thing and found a solution?
Thanks in advance.
What version of capistrano are you running? Are you using bundler in your application? The problem is that capistrano is not using bundle exec when running commands... It should be running bundle exec rake... not just rake...

ferret_server start problem druing the deploy

When do the cap deploy everything works fine except the ferret-server, while restarting server its try to stop the ferret_server in production mode and try to start the ferret_server but it fails due to permission problem .Here is the output from my deploy file** transaction: commit
executing deploy:restart'
triggering before callbacks fordeploy:restart'
executing `ferret:stop'
executing "cd /home/sj/reelinfo/current; script/ferret_server -e production stop || true"
servers: ["67.23.28.171"]
[67.23.28.171] executing command
** [out :: 67.23.28.171] sh: script/ferret_server: Permission denied
command finished
executing "chown www-data -R /home/sj/reelinfo/current/"
servers: ["67.23.28.171"]
[67.23.28.171] executing command
command finished
executing "touch /home/sj/reelinfo/current/tmp/restart.txt"
servers: ["67.23.28.171"]
[67.23.28.171] executing command
command finished
triggering after callbacks for `deploy:restart'
executing `ferret:start'
executing "cd /home/sj/reelinfo/current; script/ferret_server -e production start"
servers: ["67.23.28.171"]
[67.23.28.171] executing command
** [out :: 67.23.28.171] sh: script/ferret_server: Permission denied
command finished
failed: "sh -c \"cd /home/sj/reelinfo/current; script/ferret_server -e production start\"" on 67.23.28.171
I've had this problem as well, the issue is that script/ferret_server did not have executable permissions.
I added the following deploy task to handle the permissions:
before "deploy:restart", "correct_ferret_server_permissions"
task :correct_ferret_server_permissions do
run "chmod a+x #{current_path}/script/ferret_server
end

Resources