Express is a node.js web application framework. Before installing express we need to install node.js and npm (Node Packaged Modules). I recommend you to update your system with this PPA (Personal Package Archives) so you can install an up-to-date version of node.js:

The default capistrano task for compiling the assets compiles them every time, regardless of whether any assets were changed in the set of commits that you are deploying. This is the code snippet I use to check if the assets have changed:

It’s based in this other snippet. You have to load the file that contains the snippet after loading the default capistrano asset tasks. For example, if the above snippet is in lib/deploy/assets.rb, you should write in your main deploy.rb file something like:

I’m using Paperclip (2.3.11) to upload images to S3 and, as some other people have pointed out, if the content of a file changes but its name remains the same (for example, if you recrop the image), the timestamp added by Paperclip to the end of image URL won’t change. Consequently, the browser thinks the image hasn’t changed, and will display the old version.

Being image a Paperclip::Attachment, the url method will return something like:

Custom processors are currently not being loaded correctly in Rails 3 from lib/paperclip_processors, so a quick hack is to define it as a regular initializer. Don’t forget to specify the :processors option to has_attached_file: