我在让 Rapns 在暂存环境中工作时遇到问题。在我的本地主机上运行开发时一切正常,但是在暂存(使用 AWS)时,我无法启动守护程序或调用Rapns.push
打电话时bundle exec rapns staging
我没有收到任何错误,但没有发送通知。
使用 bundle exec rapns staging -f
或尝试Rapns.push
从 rails 控制台调用时,我得到:
[2013-05-29 06:54:20] [ios] Started, 1 handler.
[2013-05-29 06:54:20] [ERROR] [ios] Exception raised during startup. Notifications will not be delivered for this app.
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/logger.rb:365:in `<': comparison of Fixnum with Array failed (ArgumentError)
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/logger.rb:365:in `add'
from .../shared/bundle/ruby/1.9.1/gems/activesupport-3.2.7/lib/active_support/buffered_logger.rb:80:in `add'
from .../shared/bundle/ruby/1.9.1/gems/activesupport-3.2.7/lib/active_support/buffered_logger.rb:90:in `error'
from .../shared/bundle/ruby/1.9.1/gems/rapns-3.3.0/lib/rapns/logger.rb:53:in `log'
from .../shared/bundle/ruby/1.9.1/gems/rapns-3.3.0/lib/rapns/logger.rb:28:in `error'
from .../shared/bundle/ruby/1.9.1/gems/rapns-3.3.0/lib/rapns/daemon/app_runner.rb:34:in `rescue in sync_app'
from .../shared/bundle/ruby/1.9.1/gems/rapns-3.3.0/lib/rapns/daemon/app_runner.rb:30:in `sync_app'
from .../shared/bundle/ruby/1.9.1/gems/rapns-3.3.0/lib/rapns/daemon/app_runner.rb:20:in `block in sync'
from .../shared/bundle/ruby/1.9.1/gems/rapns-3.3.0/lib/rapns/daemon/app_runner.rb:20:in `each'
from .../shared/bundle/ruby/1.9.1/gems/rapns-3.3.0/lib/rapns/daemon/app_runner.rb:20:in `sync'
from .../shared/bundle/ruby/1.9.1/gems/rapns-3.3.0/lib/rapns/daemon.rb:47:in `start'
from .../shared/bundle/ruby/1.9.1/gems/rapns-3.3.0/bin/rapns:36:in `<top (required)>'
from .../shared/bundle/ruby/1.9.1/bin/rapns:23:in `load'
from .../shared/bundle/ruby/1.9.1/bin/rapns:23:in `<main>'
同样,一切都在我的本地机器上运行良好。有任何想法吗?提前非常感谢!