I have followed this tutorial to configure apn_on_rails but I am getting the following error message when I call my action:
uninitialized constant APN::Device
This is the line that produces the conflict:
device = APN::Device.create(:token => device_token)
As suggested here, I have added a require 'apn_on_rails' in my environment.rb but nothing changed.
It seems that the gem apn_on_rails is only installed under gem/bundler, could that be the problem? If so, how can I install it if I have it in my gemfile like this:
gem 'apn_on_rails', :git => 'https://github.com/natescherer/apn_on_rails.git', :branch => 'rails3'
then how can I call something like sudo gem install 'apn_on_rails' ... to install that version?
I am using ruby 1.9.2 and rails 3.1.
Any help is greatly appreciated.