Rails 3 和苹果推送通知服务
有没有人能够使用 rails 3 向 iPhone 发送推送通知?仅限 APN on rails 和 samesoffes 插件使用 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