Capistrano::Configuration.instance(:must_exist).load do define_recipe :sass do # # Tasks # namespace :sass do desc 'Updates the stylesheets generated by Sass' task :update, :roles => :app, :except => { :no_release => true } do invoke_command "cd #{latest_release}; RAILS_ENV=#{rails_env} rake sass:update" end end # # Callbacks # # Generate all the stylesheets manually (from their Sass templates) before each restart. before 'deploy:restart', 'sass:update' end end