Rails 3 和苹果推送通知服务 [英] Rails 3 and apple push notification service

查看:37
本文介绍了Rails 3 和苹果推送通知服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人能够使用 rails 3 向 iPhone 发送推送通知?仅限 APN on railssamesoffes 插件使用 rails 2.我是 rails 的新手,我无法使它们中的任何一个工作.

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.

以下是我遇到的错误:

Rails 上的 APN:

APN on Rails :

试图替换

ruby script/generate apn_migrations

rails generate apn_migrations

得到:

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

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

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

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

Samsoffes 插件:

Samsoffes plugin :

我没有设法配置 gem :

I did not manage to config the gem :

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

给了我:

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

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

任何帮助将不胜感激!

谢谢,文森特

推荐答案

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

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'

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

这篇关于Rails 3 和苹果推送通知服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆