Rails 3 notification service and apple push

Has anyone been able to send push notification to iPhone using rails 3? APN on rails and the samesoffes plugin only works with rails 2. I am new to rails and I have not been able to get any of them to work.

Here are the errors I encountered:

APN on Rails:

tried to replace

ruby script/generate apn_migrations 

FROM

 rails generate apn_migrations 

got:

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

I was also unable to start the configuration "config.gem" apn_on_rails "(config.gem: command not found)

Samsoffes Plugin:

I was unable to configure 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

+8
ruby-on-rails-3 apple-push-notifications
source share
3 answers

I had the same problem, I used the 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 on my blog

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

+16
source share

I wrote an apn_on_rails replacement called Rpush specifically designed for Rails 3. I also added many additional features, such as persistent APN connections (as recommended by Apple). Frequent connections / disconnections may force you to prohibit the use of APN, as apn_on_rails works now.

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

+14
source share

There is no config.gem in rails 3 ... Open your Gemfile :

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

Source: https://habr.com/ru/post/650831/


All Articles