HerokuのダッシュボードからPusherを追加。 リミットはあるけど無料で使える。 設定 APIキーとかを追加。Herokuのプロダクションは何にもしなくても面倒をみてくれるみたい。 Pusher.url とか Pusher.app_id とかは自分のローカル環境とHeroku上のアプリとでは違うものなので注意。 config/environments/development.rb # Real time notification require 'pusher' Pusher.url = "http://7f115110ccdsxxxxxxxxx:[email protected]/apps/100000" Pusher.logger = Rails.logger # Lines below are needed only for development environment. #
![RailsとHerokuでノーティフィケーションをプッシュする / PusherとTurbolinksの兼ね合い](https://cdn-ak-scissors.b.st-hatena.com/image/square/e42e8094d7bb5fe980c3c9ed5ae04ae611667149/height=288;version=1;width=512/https%3A%2F%2Fworkabroad.jp%2Fassets%2Fogp%2Frails-ec58549f80b7073f28673874c1cdfeb26eaf7f613a14d7665d8e9cf5b06b10d9.jpg)