Closed errows closed 13 years ago
Hi, Can we provide more details to help someone figure this out? We still haven't found a solution.
Thank you, Marc-Antoine
Looks like the error is coming from "[GEM_ROOT]/gems/actionpack-3.0.7/lib/action_controller/caching/sweeping.rb" ... which would be the sweeper you're using. You didn't mention what the error actually was. From the stacktrace, I don't see what this has to do with Jammit.
Hi Jeremy, The error is raised when my browser tries to reach the CSS files packaged by Jammit the first time (/assets/frontend.css). Calling this URL returns an error 500 the first hit and returns the CSS properly the second time. The stack trace above is what is logged when I get the error 500.
Why did you close the issue?
Thank you
The stack trace doesn't include the error message, which would tell you what the error actually was, inside of sweeping.rb at line 82. Even if it did tell you what the error was, it would be an error in the sweeper, not in Jammit -- I'm afraid there's no way for me to help you with it.
NoMethodError: undefined method `controller_name' for nil:NilClass Action jammit#package File [GEM_ROOT]/gems/actionpack-3.0.7/lib/action_controller/caching/sweeping.rb:82 {"extension"=>"css", "action"=>"package", "package"=>"frontend", "controller"=>"jammit"}
I understand the error is not in the Jammit gem, but still caused by Jammit.
Jeremy, Can we re-open this issue. I do believe the issue is caused by Jammit and would love to fix it. Thank you Marc-Antoine
Jeremy, believe it or not, I finally found the problem. Our application already has an AssetsController. Changing the package_path as described in the documentation fixed this issue with Jammit.
Thought I would share for others...
Hi, Every time I deploy to our staging or production server using capistrano, the first page load comes without any CSS or JS. It takes a very long time to load (server restart or asset packaging?). Looking at the console, I see that the assets http calls return a 500 error. Hoptoad logs the following error:
[GEM_ROOT]/gems/actionpack-3.0.7/lib/action_controller/caching/sweeping.rb:82:in'
callback' [GEM_ROOT]/gems/actionpack-3.0.7/lib/action_controller/caching/sweeping.rb:64:in
after' [GEM_ROOT]/gems/activesupport-3.0.7/lib/active_support/callbacks.rb:332:inaround' [GEM_ROOT]/gems/activesupport-3.0.7/lib/active_support/callbacks.rb:315:in
_callback_around_13' [GEM_ROOT]/gems/activesupport-3.0.7/lib/active_support/callbacks.rb:220:in_conditional_callback_around_649' [GEM_ROOT]/gems/activesupport-3.0.7/lib/active_support/callbacks.rb:431:in
_run3409898037604311095process_action1199222331910899595callbacks' [GEM_ROOT]/gems/activesupport-3.0.7/lib/active_support/callbacks.rb:410:in_run_process_action_callbacks' [GEM_ROOT]/gems/activesupport-3.0.7/lib/active_support/callbacks.rb:94:in
run_callbacks' [GEM_ROOT]/gems/actionpack-3.0.7/lib/abstract_controller/callbacks.rb:17:inprocess_action' [GEM_ROOT]/gems/actionpack-3.0.7/lib/action_controller/metal/instrumentation.rb:30:in
block in process_action' [GEM_ROOT]/gems/activesupport-3.0.7/lib/active_support/notifications.rb:52:inblock in instrument' [GEM_ROOT]/gems/activesupport-3.0.7/lib/active_support/notifications/instrumenter.rb:21:in
instrument' [GEM_ROOT]/gems/activesupport-3.0.7/lib/active_support/notifications.rb:52:ininstrument' [GEM_ROOT]/gems/actionpack-3.0.7/lib/action_controller/metal/instrumentation.rb:29:in
process_action' [GEM_ROOT]/gems/actionpack-3.0.7/lib/action_controller/metal/rescue.rb:17:inprocess_action' [GEM_ROOT]/gems/actionpack-3.0.7/lib/abstract_controller/base.rb:119:in
process' [GEM_ROOT]/gems/actionpack-3.0.7/lib/abstract_controller/rendering.rb:41:inprocess' [GEM_ROOT]/gems/actionpack-3.0.7/lib/action_controller/metal.rb:138:in
dispatch' [GEM_ROOT]/gems/actionpack-3.0.7/lib/action_controller/metal/rack_delegation.rb:14:indispatch' [GEM_ROOT]/gems/actionpack-3.0.7/lib/action_controller/metal.rb:178:in
block in action' [GEM_ROOT]/gems/actionpack-3.0.7/lib/action_dispatch/routing/route_set.rb:62:incall' [GEM_ROOT]/gems/actionpack-3.0.7/lib/action_dispatch/routing/route_set.rb:62:in
dispatch' [GEM_ROOT]/gems/actionpack-3.0.7/lib/action_dispatch/routing/route_set.rb:27:incall' [GEM_ROOT]/gems/rack-mount-0.6.14/lib/rack/mount/route_set.rb:148:in
block in call' [GEM_ROOT]/gems/rack-mount-0.6.14/lib/rack/mount/code_generation.rb:93:inblock in recognize' [GEM_ROOT]/gems/rack-mount-0.6.14/lib/rack/mount/code_generation.rb:670:in
optimized_each' [GEM_ROOT]/gems/rack-mount-0.6.14/lib/rack/mount/code_generation.rb:92:inrecognize' [GEM_ROOT]/gems/rack-mount-0.6.14/lib/rack/mount/route_set.rb:139:in
call' [GEM_ROOT]/gems/actionpack-3.0.7/lib/action_dispatch/routing/route_set.rb:493:incall' [GEM_ROOT]/gems/sass-3.1.1/lib/sass/plugin/rack.rb:54:in
call' [GEM_ROOT]/gems/warden-1.0.3/lib/warden/manager.rb:35:inblock in call' [GEM_ROOT]/gems/warden-1.0.3/lib/warden/manager.rb:34:in
catch' [GEM_ROOT]/gems/warden-1.0.3/lib/warden/manager.rb:34:incall' [GEM_ROOT]/gems/actionpack-3.0.7/lib/action_dispatch/middleware/best_standards_support.rb:17:in
call' [GEM_ROOT]/gems/actionpack-3.0.7/lib/action_dispatch/middleware/head.rb:14:incall' [GEM_ROOT]/gems/rack-1.2.2/lib/rack/methodoverride.rb:24:in
call' [GEM_ROOT]/gems/actionpack-3.0.7/lib/action_dispatch/middleware/params_parser.rb:21:incall' [GEM_ROOT]/gems/actionpack-3.0.7/lib/action_dispatch/middleware/flash.rb:182:in
call' [GEM_ROOT]/gems/actionpack-3.0.7/lib/action_dispatch/middleware/session/abstract_store.rb:149:incall' [GEM_ROOT]/gems/actionpack-3.0.7/lib/action_dispatch/middleware/cookies.rb:302:in
call' [GEM_ROOT]/gems/activerecord-3.0.7/lib/active_record/query_cache.rb:32:inblock in call' [GEM_ROOT]/gems/activerecord-3.0.7/lib/active_record/connection_adapters/abstract/query_cache.rb:28:in
cache' [GEM_ROOT]/gems/activerecord-3.0.7/lib/active_record/query_cache.rb:12:incache' [GEM_ROOT]/gems/activerecord-3.0.7/lib/active_record/query_cache.rb:31:in
call' [GEM_ROOT]/gems/activerecord-3.0.7/lib/active_record/connection_adapters/abstract/connection_pool.rb:354:incall' [GEM_ROOT]/gems/actionpack-3.0.7/lib/action_dispatch/middleware/callbacks.rb:46:in
block in call' [GEM_ROOT]/gems/activesupport-3.0.7/lib/active_support/callbacks.rb:416:in_run_call_callbacks' [GEM_ROOT]/gems/actionpack-3.0.7/lib/action_dispatch/middleware/callbacks.rb:44:in
call' [GEM_ROOT]/gems/rack-1.2.2/lib/rack/sendfile.rb:107:incall' [GEM_ROOT]/gems/actionpack-3.0.7/lib/action_dispatch/middleware/remote_ip.rb:48:in
call' [GEM_ROOT]/gems/actionpack-3.0.7/lib/action_dispatch/middleware/show_exceptions.rb:47:incall' [GEM_ROOT]/gems/railties-3.0.7/lib/rails/rack/logger.rb:13:in
call' [GEM_ROOT]/gems/rack-1.2.2/lib/rack/runtime.rb:17:incall' [GEM_ROOT]/gems/rack-1.2.2/lib/rack/lock.rb:11:in
block in call' : [GEM_ROOT]/gems/rack-1.2.2/lib/rack/lock.rb:11:incall' [GEM_ROOT]/gems/dragonfly-0.8.2/lib/dragonfly/middleware.rb:16:in
call' [GEM_ROOT]/gems/railties-3.0.7/lib/rails/application.rb:168:incall' [GEM_ROOT]/gems/railties-3.0.7/lib/rails/application.rb:77:in
method_missing' /home/passenger/.rvm/gems/ruby-1.9.2-p180/gems/passenger-3.0.7/lib/phusion_passenger/rack/request_handler.rb:96:inprocess_request' /home/passenger/.rvm/gems/ruby-1.9.2-p180/gems/passenger-3.0.7/lib/phusion_passenger/abstract_request_handler.rb:513:in
accept_and_process_next_request' /home/passenger/.rvm/gems/ruby-1.9.2-p180/gems/passenger-3.0.7/lib/phusion_passenger/abstract_request_handler.rb:274:inmain_loop' /home/passenger/.rvm/gems/ruby-1.9.2-p180/gems/passenger-3.0.7/lib/phusion_passenger/rack/application_spawner.rb:205:in
start_request_handler' /home/passenger/.rvm/gems/ruby-1.9.2-p180/gems/passenger-3.0.7/lib/phusion_passenger/rack/application_spawner.rb:170:inblock in handle_spawn_application' /home/passenger/.rvm/gems/ruby-1.9.2-p180/gems/passenger-3.0.7/lib/phusion_passenger/utils.rb:479:in
safe_fork' /home/passenger/.rvm/gems/ruby-1.9.2-p180/gems/passenger-3.0.7/lib/phusion_passenger/rack/application_spawner.rb:165:inhandle_spawn_application' /home/passenger/.rvm/gems/ruby-1.9.2-p180/gems/passenger-3.0.7/lib/phusion_passenger/abstract_server.rb:357:in
server_main_loop' /home/passenger/.rvm/gems/ruby-1.9.2-p180/gems/passenger-3.0.7/lib/phusion_passenger/abstract_server.rb:206:instart_synchronously' /home/passenger/.rvm/gems/ruby-1.9.2-p180/gems/passenger-3.0.7/lib/phusion_passenger/abstract_server.rb:180:in
start' /home/passenger/.rvm/gems/ruby-1.9.2-p180/gems/passenger-3.0.7/lib/phusion_passenger/rack/application_spawner.rb:128:instart' /home/passenger/.rvm/gems/ruby-1.9.2-p180/gems/passenger-3.0.7/lib/phusion_passenger/spawn_manager.rb:253:in
block (2 levels) in spawn_rack_application' /home/passenger/.rvm/gems/ruby-1.9.2-p180/gems/passenger-3.0.7/lib/phusion_passenger/abstract_server_collection.rb:132:inlookup_or_add' /home/passenger/.rvm/gems/ruby-1.9.2-p180/gems/passenger-3.0.7/lib/phusion_passenger/spawn_manager.rb:246:in
block in spawn_rack_application' /home/passenger/.rvm/gems/ruby-1.9.2-p180/gems/passenger-3.0.7/lib/phusion_passenger/abstract_server_collection.rb:82:inblock in synchronize' : /home/passenger/.rvm/gems/ruby-1.9.2-p180/gems/passenger-3.0.7/lib/phusion_passenger/abstract_server_collection.rb:79:in
synchronize' /home/passenger/.rvm/gems/ruby-1.9.2-p180/gems/passenger-3.0.7/lib/phusion_passenger/spawn_manager.rb:244:inspawn_rack_application' /home/passenger/.rvm/gems/ruby-1.9.2-p180/gems/passenger-3.0.7/lib/phusion_passenger/spawn_manager.rb:137:in
spawn_application' /home/passenger/.rvm/gems/ruby-1.9.2-p180/gems/passenger-3.0.7/lib/phusion_passenger/spawn_manager.rb:275:inhandle_spawn_application' /home/passenger/.rvm/gems/ruby-1.9.2-p180/gems/passenger-3.0.7/lib/phusion_passenger/abstract_server.rb:357:in
server_main_loop' /home/passenger/.rvm/gems/ruby-1.9.2-p180/gems/passenger-3.0.7/lib/phusion_passenger/abstract_server.rb:206:instart_synchronously' /home/passenger/.rvm/gems/ruby-1.9.2-p180/gems/passenger-3.0.7/helper-scripts/passenger-spawn-server:99:in
We are also using acts_as_audited, which is also using a sweeper. We are using jammit 0.6.3
Any help would be appreciated, a this point we are quite clueless. Thanks everyone.