Q:

capistrano dev deploy fails

A bit new to the capistrano deploys so I'm struggling with getting this to work correctly.  I found another entry saying this is a symlink issue but I don't think it is since "cap dev deploy" creates the current symlink correctly. I have a stage and a dev environment on this server (/apps/myhost/dev and /apps/myhost/stage) and I'm looking to push my most recent git changes from git to the dev environment.  I SSH in as the application user and do:
cap dev deploy

I receive the following error:
failed: "rvm_path=/usr/local/rvm /usr/local/bin/rvm-shell 'ree@myhost' -c 'bundle install --gemfile /apps/myhost/dev/releases/20110526014237/Gemfile --path /apps/myhost/dev/shared/bundle --deployment --quiet --without development test'" on dev.myhost.com

Which is preceded by a lot of:
rm: cannot remove directory `/apps/myhost/dev/releases/20110526014237/test/functional': No such file or directory

I assume the rm error is because the directory and files have already been cleaned up but I'm uncertain why the rvm_path rvm-shell fails?

A:

Checked my /apps/myapp/dev/config/deploy/ directory and found these files:
dev.rb
stage.rb
prod.rb

Had role and server variables set so it was trying to deploy twice causing the lock. Removed the server line and was able to deploy.
Regarding the trust; added this line to config/deploy.rb:
task :trust_rvmrc do
    run "rvm rvmrc trust #{latest_release}"
end

