Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby-on-rails-4/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 4 轨道上的gcm 4.0.0_Ruby On Rails 4_Google Cloud Messaging - Fatal编程技术网

Ruby on rails 4 轨道上的gcm 4.0.0

Ruby on rails 4 轨道上的gcm 4.0.0,ruby-on-rails-4,google-cloud-messaging,Ruby On Rails 4,Google Cloud Messaging,我正在使用rails 4.0.0,我正在尝试使用Android的谷歌云消息 我已经试着用了 (安装了窃听器,不适用于rails 4.0) (ssl错误) …github.com/push-notification/crusade_rails(太复杂了,我认为它使用了另一个gem) …github.com/ileitch/rapns(我认为它使用了/spacialdb/gcm gem,我找不到发送方法) 苏,他们都失败了 我只想要一个简单的gem来发送一个关于android的通知(复数)。 我应该

我正在使用rails 4.0.0,我正在尝试使用Android的谷歌云消息

我已经试着用了 (安装了窃听器,不适用于rails 4.0) (ssl错误) …github.com/push-notification/crusade_rails(太复杂了,我认为它使用了另一个gem) …github.com/ileitch/rapns(我认为它使用了/spacialdb/gcm gem,我找不到发送方法)

苏,他们都失败了

我只想要一个简单的gem来发送一个关于android的通知(复数)。 我应该自己尝试使用gcm吗

谢谢你

编辑: 我正在重新尝试/spacialdb/gcm,
它给出了错误代码401,从故障排除中我看到:

Authorization header missing or with invalid syntax. 
#since i am using the gem, dont think this is the problem

Invalid project number sent as key. 
#i am not sure if it is the Project Number or the API KEY, however i tryed the 3 options
Key valid but with GCM service disabled.
#dont think soo, cause on APIs, Google Cloud Messaging for Android appears ON
Request originated from a server not whitelisted in the Server Key IPs. #I try both on localhost and on heroku

如果您或其他任何人感兴趣,我推出了一个小补丁,使
gcm\u on\u rails
与rails 4兼容。这是目前的情况;在发表这篇评论时,我只是提出了pull请求,所以最初的所有者还没有将其合并(事实上,出于某种原因,他们已经有近两年没有合并任何内容了…)