我在我的rails应用程序上使用gem rapns(https://github.com/ileitch/rapns)。
根据rapns doc,我需要运行
捆绑exec rapns
启动守护进程,该进程检查数据库是否要发送新通知。
所以我做了以下事情:
heroku run bundle exec rapns production --foreground
给了我错误:
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:inopen'
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:instart'
from /app/.bundle/gems/ruby/1.9.1/gems/rapns-1.0.1/bin/rapns:28:in <top (required)>'
from /app/.bundle/gems/ruby/1.9.1/bin/rapns:19:inload'
from /app/.bundle/gems/ruby/1.9.1/bin/rapns:19:in `'
我对rails和ruby非常新,有人能告诉我出了什么问题吗?
答案 0 :(得分:1)
您需要从生产配置中删除pid_file选项和/或升级到1.0.2,这可以容忍不可写的pid_file选项。