ileitch/rapns — Issue #22: can't run this on Heroku
Author: chenyuan
Created: 2011-12-15 07:23:29+00:00
State: open

Hi there,

First thing first, I tested rapns on my local machine, all good. The things is I'm new to RoR (I'm an iOS dev) and I'm hosting the server-side code on Heroku.

Issue: I wanted to run following on Heroku
bundle exec rapns

I understand this step is to kick start a background daemon which check the database for new notification to deliver periodically. I used following command:
heroku run bundle exec rapns production --foreground

which gave me:
Running bundle exec rapns production --foreground attached to terminal... up, run.3
[WARNING] Detected Rails 3.1.1, patching PostgreSQLAdapter to fix reconnection bug: https://github.com/rails/rails/issues/3160
/app/.bundle/gems/ruby/1.9.1/gems/rapns-1.0.1/lib/rapns/daemon.rb:95:in `initialize': No such file or directory - /app/tmp/pids/rapns.pid (Errno::ENOENT)
from /app/.bundle/gems/ruby/1.9.1/gems/rapns-1.0.1/lib/rapns/daemon.rb:95:in `open'
from /app/.bundle/gems/ruby/1.9.1/gems/rapns-1.0.1/lib/rapns/daemon.rb:95:in `write_pid_file'
from /app/.bundle/gems/ruby/1.9.1/gems/rapns-1.0.1/lib/rapns/daemon.rb:43:in `start'
from /app/.bundle/gems/ruby/1.9.1/gems/rapns-1.0.1/bin/rapns:28:in `'
from /app/.bundle/gems/ruby/1.9.1/bin/rapns:19:in `load'
from /app/.bundle/gems/ruby/1.9.1/bin/rapns:19:in `

'

So it's something about .pid file. I read the readme, it's set to blank in rapns.yml. I couldn't go further, please help me.

My email is chrischen79@gmail.com

Thank you very much!!!