Gurad from what base_url is `nil`

`assets:precompile` on heroku wouldn't load `ENV`.