Topic: Help! Capistrano did not deploy database.yml

I am running Rails 3.0.3 with Passenger (mod_rails). After upgrading to Rails 3.0.3 and Passenger, Capistrano does not work.
After I run cap deploy:setup and cap deploy, Passenger returns an error

Ruby (Rack) application could not be started
This application process is currently running as user 'nobody' and group 'nobody' and must be able to access its application root directory. However the parent directory has wrong permissions, thereby preventing this process from accessing its application root directory. Please fix the permissions of the directory first.

I spoke with my hosting and they tried to chown -R to nobody but still did not work. They claimed it is an issue with Capistrano, and suspect it was a symlink break. Running cap deploy did not give me any error, except I noticed that it did not (cannot) write to /shared/, so /shared/config/database.yml did not exist. The other files (in /current/) seems to be ported ok.

Here is part of my code in deploy.rb, please advice - Thanks!


set :application, "entimpact"
set :user, "root"
set :repository,  "http://root@www.entimpact.com/svn/repo"
set :use_sudo, false
set :scm, :subversion
role :web, application                       
role :app, application                         
role :db,  application, :primary => true
set :deploy_to, "/var/www/apps/#{application}"

set :branch, "master"

namespace :deploy do
    task :restart do
      run "touch #{current_path}/tmp/restart.txt"
    end

    task :symlink_shared do
      run "ln -nfs #{shared_path}/config/database.yml #{release_path}/config/database.yml"
   end
end

Last edited by wowmusic (2011-02-11 14:58:56)