When I restalled all my gems on Snow Leopard, vlad refused to find any of the tasks I had defined in my deploy.rb. I thought this was a SL issue but turned out a week before it’s release Vlad had been updated to version 2 which used a new plugin system. Looking for vlad rake tasks returned an error:
1 2 |
>> rake -T vlad Could not load vlad: no such file to load -- vlad/git |
To solve the problem just required an install of the new vlad-git gem.
1 |
>> sudo gem install vlad-git |
Now all my tasks were appearing properly. Vlad 2 always brought around a few changes in it’s deploy.rb and use. Here is my deploy.rb for reference:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
set :application, "yourdomain" set :domain, "yourdomain@yourdomain.com" set :user, "yourdomain" set :repository, "git@github.com:youraccount/yourdomain.git" task :staging do set :revision, "origin/staging" set :deploy_to, "/opt/yourdomain.staging/" end task :production do set :revision, "origin/master" set :deploy_to, "/opt/yourdomain/" end namespace :vlad do desc "Pull from git, run migrations, then (re)start the app server" task :migrate_deploy => [:update, :migrate, :start_app] desc "Pull from git then (re)start the app server" task :deploy => [:update, :start_app] desc 'Restart Passenger' remote_task :restart do puts "Touching: #{deploy_to}current/tmp/restart.txt" run "touch #{deploy_to}/current/tmp/restart.txt" end end |
Now invoking Vlad for my staging environment works as such:
1 |
>> rake staging vlad:deploy |