rubygems - apn_on_rails breaking view helpers on rails 2.3.8? -


i developing rails application should send push notifications ios devices. using apn_on_rails gem. works fine in rails console. when run server, undefined method errors basic view methods such content_for or form_tag etc:

when take require 'apn_on_rails' development.rb out, views work again, of course without push notifications.

here example trace:

processing dashboardcontroller#index (for 127.0.0.1 @ 2011-02-27 13:55:59) [get] user load (0.2ms)   select * "users" ("users"."id" = 1)  cache (0.0ms)   select * "users" ("users"."id" = 1)  rendering template within layouts/dashboard rendering dashboard/index  actionview::templateerror (undefined method `content_for' #<actionview::base:0x103343970>) on line #1 of app/views/dashboard/index.html.erb: 1: <% content_for :header %> 2:  <%= render :partial => "header", :locals => {:title => "dashboard"} %> 3: <% end %>   app/views/dashboard/index.html.erb:1 app/controllers/dashboard_controller.rb:6:in `index'  rendered rescues/_trace (28.5ms)   processing applicationcontroller#index (for 127.0.0.1 @ 2011-02-27 13:55:59) [get]  actionview::templateerror (undefined method `debug' #<actionview::base:0x103343970>) in /library/ruby/gems/1.8/gems/actionpack-2.3.8/lib/action_controller/templates/rescues/_request_and_response.erb:    rendered rescues/_trace (24.0ms) /!\ failsafe /!\  sun feb 27 13:55:59 +0100 2011  status: 500 internal server error  actionview::templateerror (undefined method `debug' #<actionview::base:0x1031eaad8>) in /library/ruby/gems/1.8/gems/actionpack-2.3.8/lib/action_controller/templates/rescues/_request_and_response.erb:     in /library/ruby/gems/1.8/gems/actionpack-2.3.8/lib/action_controller/templates/rescues/_request_and_response.erb 

thanks help...

it not evident whether call config.gem 'apn_on_rails' - sounds more require:ing library, should not @ point: point of environment setup.

have config.gem things in environment setup (i.e. development.rb), make eventual requires happen later (->in controller / model / helper in question).


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -