Using Add-ons that do not yet support async provisioning in temporary deployments (Review apps and CI apps)
Not all add-ons currently use Heroku's new asynchronous provisioning mechanism.
For add-ons that do not yet support async provisioning, you can force the build to poll the add-ons and thus wait for it to provision. Heroku Redis and Heroku Postgres do not yet support async provisioning and will currently require the steps below.
Install the add-on wait buildpack.
e.g.:
"buildpacks": [
{"url": "https://github.com/heroku/heroku-buildpack-redis.git"},
{"url": "https://github.com/heroku/heroku-buildpack-ruby.git"},
{"url": "https://github.com/heroku/heroku-buildpack-addon-wait.git"}
]
Make sure the add-on is specified in the add-ons part of your app-ci.json file (or app.json file for Review apps).
The addon(s) should be specified here even if you've already listed the add-ons in your app.json file.
e.g.
"addons": [
"heroku-postgresql",
"heroku-redis"
],
e.g.
"scripts": {
"test-setup": "bundle install --with test && bin/addon-wait && bundle exec rake db:schema:load db:migrate", "test": "bundle exec rspec -f RspecTap::Formatter"
},