I installed the AssetPackager plugin. Scott, the manager of the plugin, suggests running the asset:packager:build_all task after the symlink phase.

I disagree with that because as soon as the symlink is done, it means we’re live. We haven’t yet built the files, so users will receive 404s instead of the compressed files.

Instead, I suggest doing it after updating the code. So, his Capistrano task changes to this instead:

config/deploy.rb
1 task :after_update_code, :roles => [:web] do
2   run <<-EOF
3     cd #{release_path} &&
4     rake RAILS_ENV=production asset:packager:build_all
5   EOF
6 end

Unrelated note: From the comments on Scott’s announcement (see Timur Vafin’s comments), I am not the only one writing asse*r*t_packager. Must be all those darn assertions I write all day long…

Search

Your Host

A picture of me

I am François Beausoleil, a Ruby on Rails and Scala developer. During the day, I work on Seevibes, a platform to measure social interactions related to TV shows. At night, I am interested many things. Read my biography.

Top Tags

Books I read and recommend

Links

Projects I work on

Projects I worked on