Dont set preference on assets:precompile

Avoid opening a db connection when running assets:precompile to help
users to deploy their apps to heroku

Fixes #3703