initializers are not loaded during the rake task assets:precompile, so assets generation runs without relative url configuration in Rails and produces broken assets.