Created
April 19, 2013 12:30
-
-
Save tieleman/5420030 to your computer and use it in GitHub Desktop.
Snippet to deploy Rails 4. Don't use the Capistrano asset tasks.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
after "deploy:restart", "deploy:cleanup" | |
namespace :deploy do | |
task :restart, :roles => :web do | |
run "touch #{release_path}/tmp/restart.txt" | |
end | |
task :finalize_update, :roles => :web do | |
run "RAILS_ENV=#{rails_env}" | |
run "cd #{release_path}; RAILS_ENV=#{rails_env} bundle exec rake db:migrate" | |
# Manually do this because Capistrano support is broken for Rails 4 | |
run "cd #{release_path}; RAILS_ENV=#{rails_env} bundle exec rake assets:precompile" | |
run "chmod -R g+w #{release_path}" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment