Skip to content
Dan K edited this page Jun 9, 2016 · 4 revisions

This isn't an exhaustive guide to Heroku, I assume your Rails app is already deployed there!

Install rpush

echo 'gem "rpush"' >> Gemfile
bundle
rpush init
echo 'rpush: bundle exec rpush start -e $RACK_ENV -f' >> Procfile
git add -A
git commit -am "Adding rpush."
git push heroku master
heroku run rake db:migrate

rpush is now installed, but we need to create an Rpush::App before we start it.

$ heroku run rails console
Running console attached to terminal... up, run.1
Loading production environment (Rails 4.2.6)
>> app = Rpush::Apns::App.new
>> app.name = "my_app"
>> app.environment = "production" # APNs environment.
>> app.certificate = File.read("/path/to/production.pem")
>> app.save!

Start rpush

heroku scale rpush=1

Check it's running with heroku ps and heroku logs.