Skip to content

Instantly share code, notes, and snippets.

@andhapp
Created March 26, 2012 09:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andhapp/2204189 to your computer and use it in GitHub Desktop.
Save andhapp/2204189 to your computer and use it in GitHub Desktop.
capistrano pre-compile assets for rails 3.1
desc "precompile the assets"
task :precompile_assets, :roles => :web, :except => { :no_release => true } do
run "cd #{current_path}; rm -rf public/assets/*"
run "cd #{current_path}; RAILS_ENV=production bundle exec rake assets:precompile"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment