Joined August 2017
·

benjyforrest2

wanna be programmer
·
·
·

Posted to Run Rake tasks with Capistrano over 1 year ago

hi - i tried this but the 'command' doesn't seem to be passed to task so it runs

soHOSTS=vmdeployer cap production rake:db:create
misses the 'create'
e.g.
bundle exec rake db: RAILS_ENV=production

namespace :rake do
namespace :db do
%w[create migrate reset rollback seed setup].each do |command|
desc "Rake db:#{command}"
task command, roles: :app, except: {norelease: true} do
run "cd #{deploy
to}/current"
run "bundle exec rake db:#{ENV['task']} RAILSENV=#{railsenv}"
end
end
end
end

what have i missed?

Achievements
1 Karma
0 Total ProTip Views