I forget the original resource I found these tasks from but they are worth sharing here again with all of you.

Palm Tree

My repositories all ignore css files and they are generated from the SASS files with a Capistrano deploy hook. Add in Asset Packager and you end up with a small dependance chain for deployment. The dependancies are pretty easy to get past but hopefully this will save someone else a few minutes.

Rake task file to create all your css files from SASS.


# lib/tasks/sass.rake

namespace :sass do
  desc 'Updates stylesheets if necessary from their Sass templates.'
  task :update => :environment do
    Sass::Plugin.update_stylesheets
  end
end

Capistrano tasks along with the dependance hooks.


# config/deploy.rb

namespace :deploy do
  desc 'Create asset packages for production'
  task :package_assets, :roles => :app do
    run <<-EOF
      cd #{deploy_to}/current && rake RAILS_ENV=production asset:packager:build_all
    EOF
  end
end

namespace :sass do
  desc 'Updates the stylesheets generated by Sass'
  task :update do
    run "cd #{current_path} && rake sass:update"
  end
end

after  'deploy:symlink',    'deploy:package_assets'
before 'deploy:package_assets', 'sass:update'