Set initialize_on_precompile to false to solve Heroku and Rails error when deploying