Rails 3.1 Assets Precompilation

Today I tried to 'release' our rails 3.1 product to the production environment. Which of course has precompiled assets.

The app deployed nicely. But when I tried to start the app, I've got the following error:

ActionView::Template::Error (locales/nl.js isn't precompiled): 
...

Deploying the app with capistrano (which precompiles my assets) did not compile my javascript-locales.

The cause of this seeems to the that the assets pipeline precompilation task, only precompiles the application.js file...

To add extra files for precompilation, place the following code in your config/application.rb:

    config.assets.precompile << "locales/*.js"  
    config.assets.precompile += %w(rails_admin/rails_admin.js rails_admin/rails_admin.css)

This examples precompiles ALL my locale files in the app/assets/locales/* directory.

And as a bonus it also compiles the assets of the the rails_admin plugin.