在 heroku 上使用 rapns 进行推送通知

发布于 2024-12-21 09:45:48 字数 1201 浏览 3 评论 0原文

我在我的 Rails 应用程序上使用 gem rapns (https://github.com/ileitch/rapns)。

根据 rapns 文档,我需要运行

捆绑执行 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​​ 非常陌生,有人可以告诉我出了什么问题吗?

I'm using gem rapns (https://github.com/ileitch/rapns) on my rails app.

According to rapns doc, I need to run

bundle exec rapns

to kick start the daemon process which checks database for new notifications to send.

So I did following:

heroku run bundle exec rapns production --foreground

which gave me error:

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 `'

I'm very very new to rails and ruby, can someone tell me what's going wrong?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

夏日浅笑〃 2024-12-28 09:45:48

您需要从生产配置中删除 pid_file 选项和/或升级到 1.0.2,它可以容忍不可写的 pid_file 选项。

You need to remove the pid_file option from the production configuration and/or upgrade to 1.0.2, which is tolerant of a non-writable pid_file option.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文