Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/61.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 apn#u发送器gem不';不要推动生产_Ruby On Rails - Fatal编程技术网

Ruby on rails apn#u发送器gem不';不要推动生产

Ruby on rails apn#u发送器gem不';不要推动生产,ruby-on-rails,Ruby On Rails,有以下代码: options = { alert: "123", badge: "+1", sound: true } User.find_each do |user| APN.notify_async(user.device_token, options) end 我还将apn_development.pem放入config/certs文件夹中。这段代码在我的本地机器上正常工作,但在生产服务器上不工作——我的Rails应用程序没有任何推送功能。有什么

有以下代码:

    options = { alert: "123", badge: "+1", sound: true }
    User.find_each do |user|
        APN.notify_async(user.device_token, options)
    end 

我还将
apn_development.pem
放入
config/certs
文件夹中。这段代码在我的本地机器上正常工作,但在生产服务器上不工作——我的Rails应用程序没有任何推送功能。有什么问题吗?我怎样才能修好它?谢谢

可能环境文件包含一些与此gem代码相关的内容。您还可以在您的计算机上以生产模式启动服务器,并尝试对其进行调试。我的本地计算机上没有MySQL:)还有其他方法吗?:)好的,如果您有足够的数据来执行必要的操作,您可以在dev上更改db production config。