deploy:assets:precompile insists on running on production environment in capistrano

Problem
You want to deploy your rails 3.2 application to another environment except production, but the default capistrano recipe for precompiling the assets keeps using the production environment as in:

Solution
Add the following environment option in your deploy/other_env.rb file: