Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/65.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 在heroku上使用RAPN进行推送通知_Ruby On Rails_Heroku_Push Notification - Fatal编程技术网

Ruby on rails 在heroku上使用RAPN进行推送通知

Ruby on rails 在heroku上使用RAPN进行推送通知,ruby-on-rails,heroku,push-notification,Ruby On Rails,Heroku,Push Notification,我用的是宝石环(https://github.com/ileitch/rapns)在我的rails应用程序上 根据rapns医生的说法,我需要跑步 bundle-exec-rapns 启动守护进程,该进程检查数据库中是否有要发送的新通知 所以我做了以下几点: heroku run bundle exec rapns产品——前景 这给了我一个错误: Running bundle exec rapns production --foreground attached to terminal... u

我用的是宝石环(https://github.com/ileitch/rapns)在我的rails应用程序上

根据rapns医生的说法,我需要跑步

bundle-exec-rapns

启动守护进程,该进程检查数据库中是否有要发送的新通知

所以我做了以下几点:

heroku run bundle exec rapns产品——前景

这给了我一个错误:

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 `'
正在运行bundle exec rapns生产--前台连接到终端。。。起来,跑
[警告]检测到Rails 3.1.1,正在修补PostgreSQLAdapter以修复重新连接错误:https://github.com/rails/rails/issues/3160
/app/.bundle/gems/ruby/1.9.1/gems/rapns-1.0.1/lib/rapns/daemon.rb:95:在初始化中:没有这样的文件或目录-/app/tmp/pids/rapns.pid(Errno::enoint)
来自/app/.bundle/gems/ruby/1.9.1/gems/rapns-1.0.1/lib/rapns/daemon.rb:95:inopen'
来自/app/.bundle/gems/ruby/1.9.1/gems/rapns-1.0.1/lib/rapns/daemon.rb:95:in write_pid_文件'
来自/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'
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非常陌生,有人能告诉我出了什么问题吗?

您需要从生产配置中删除pid_文件选项和/或升级到1.0.2,它允许使用不可写的pid_文件选项