init_app(app) error 'assets instance not bound to an application'

When doing

    assets_env = Environment()
    assets_env.init_app(app)

I get `RuntimeError: assets instance not bound to an application, and no application in current context`.