Rails 3 和苹果推送通知服务

发布于 2024-10-11 10:19:59 字数 901 浏览 3 评论 0原文

有人能够使用 Rails 3 向 iPhone 发送推送通知吗? 仅限 APN on Railssamesoffes 插件适用于 Rails 2。我是 Rails 新手,我无法使它们中的任何一个工作。

以下是我遇到的错误:

Rails 上的 APN:

尝试替换

ruby script/generate apn_migrations

rails generate apn_migrations

got:

myApp/config/environment.rb:5:in `require':没有要加载的文件-- apn_on_rails(加载错误)

我也没有设法运行配置“config.gem 'apn_on_rails'”(config.gem:找不到命令)

Samsoffes 插件:

我没有设法配置 gem:

config.gem "apple_push_notification", :source => "http://gemcutter.org/"

给了我:

http://gemcutter.org/:没有这样的文件或 目录

任何帮助将不胜感激!

谢谢, 文森特

Has anybody been able to send push notification to iPhone using rails 3 ?
APN on rails and samesoffes plugin only works with rails 2. I am new to rails and i have not been able to make either of them work.

Here are the errors i encountered :

APN on Rails :

tried to replace

ruby script/generate apn_migrations

With

rails generate apn_migrations

got :

myApp/config/environment.rb:5:in
`require': no such file to load --
apn_on_rails (LoadError)

I also did not manage to run the configuration "config.gem 'apn_on_rails'" (config.gem: command not found)

Samsoffes plugin :

I did not manage to config the gem :

config.gem "apple_push_notification", :source => "http://gemcutter.org/"

gave me :

http://gemcutter.org/: No such file or
directory

Any help would be greatly appreciated !

Thanks,
Vincent

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

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

发布评论

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

评论(3

又怨 2024-10-18 10:19:59

我遇到了同样的问题,我使用了rails3分支

gem 'apn_on_rails', :git => 'https://github.com/natescherer/apn_on_rails.git', :branch => 'rails3'

这解决了我的问题,我将详细信息写入我的博客

http:// /yekmer.posterous.com/how-to-send-iphone-push-notifications-in-rail

I had the same problem, I had used a rails3 branch

gem 'apn_on_rails', :git => 'https://github.com/natescherer/apn_on_rails.git', :branch => 'rails3'

This solved my problem and I wrote the details to my blog

http://yekmer.posterous.com/how-to-send-iphone-push-notifications-in-rail

瀞厅☆埖开 2024-10-18 10:19:59

我专门针对 Rails 3 编写了一个名为 Rpush 的 apn_on_rails 替代品。我还添加了一些额外的功能,例如与 APN 的持久连接(按照 Apple 的建议)。频繁的连接/断开可能会导致您被禁止使用 APN,这就是 apn_on_rails 目前的工作原理。

RPUSH: https://github.com/rpush/rpush

I've written an apn_on_rails replacement called Rpush specifically targeted at Rails 3. I've also added a bunch of extra features like persistent connections to the APNs (as recommended by Apple). Frequent connects/disconnects may get you banned from the APNs, which is how apn_on_rails currently works.

Rpush: https://github.com/rpush/rpush

寻梦旅人 2024-10-18 10:19:59

在 Rails 3 中,没有 config.gem...打开您的 Gemfile

gem 'apple_push_notification', :git => 'http://gemcutter.org/path_to_that_gem_on_gem_cutter.git'

In rails 3, there is no config.gem... Open up your Gemfile:

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