How to avoid precompiled assets being served in development mode?

In config/environments/development.rb set:

config.assets.prefix = "/assets_dev"

so that in development mode Rails will look there (but it will not find anything, as you will not compile assets in development (this is indeed what you are trying to do — not compile assets)).

When precompiling for production, use

RAILS_ENV=production rake assets:precompile

so it compiles into the default assets folder, public/assets.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)