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 #{deployto}/current"
run "bundle exec rake db:#{ENV['task']} RAILSENV=#{railsenv}"
end
end
end
end
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 #{deployto}/current"
run "bundle exec rake db:#{ENV['task']} RAILSENV=#{railsenv}"
end
end
end
end
what have i missed?