Skip to content

Instantly share code, notes, and snippets.

@jcorcuera
Created October 25, 2011 16:48
Show Gist options
  • Save jcorcuera/1313423 to your computer and use it in GitHub Desktop.
Save jcorcuera/1313423 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