Bug #1249
Add sidebar in development mode failed
| Status : | New | Start : | 08/09/2008 | |
| Priority : | Normal | Due date : | ||
| Assigned to : | - | % Done : | 0% |
|
| Category : | sidebars | |||
| Target version : | 5.2 | |||
| Resolution : |
Description
After an update of subversion repository of Typo, I test the sidebar system in development mode of rails. But add a sidebar failed. If I move sidebar, there are no problem.
So the stacktrace when add failed is :
Processing SidebarController#set_active (for 127.0.0.1 at 2008-08-09 11:00:55) [POST]
Session ID: 7e26275a61d03c310ec2d8fceb4c5236
Parameters: {"authenticity_token"=>"6a6fab9e05c3c465d9dc99bfd3ca0cbefb0b232e", "action"=>"set_active", "controller"=>"admin/sidebar", "active"=>["page-1", "page", "category-2", "archives-3", "static-4", "xml-5"]}
Trigger Load (0.000475) SELECT * FROM triggers WHERE (due_at <= '2008-08-09 11:00:55.879343')
Blog Load (0.000302) SELECT * FROM blogs ORDER BY id LIMIT 1
SQL (0.001549) SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull
FROM pg_attribute a LEFT JOIN pg_attrdef d
ON a.attrelid = d.adrelid AND a.attnum = d.adnum
WHERE a.attrelid = 'users'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum
User Load (0.000541) SELECT * FROM users WHERE (users."id" = 1) LIMIT 1
SQL (0.005430) SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull
FROM pg_attribute a LEFT JOIN pg_attrdef d
ON a.attrelid = d.adrelid AND a.attnum = d.adnum
WHERE a.attrelid = 'profiles'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum
Profile Load (0.000407) SELECT * FROM profiles WHERE (profiles."id" = 1)
SQL (0.000246) SELECT version FROM schema_info
Sidebar Load (0.000511) SELECT * FROM sidebars WHERE (sidebars."id" = 1)
Sidebar Load (0.000298) SELECT * FROM sidebars WHERE (sidebars."id" = 2)
Sidebar Load (0.000283) SELECT * FROM sidebars WHERE (sidebars."id" = 3)
Sidebar Load (0.000277) SELECT * FROM sidebars WHERE (sidebars."id" = 4)
Sidebar Load (0.000280) SELECT * FROM sidebars WHERE (sidebars."id" = 5)
SQL (0.000107) BEGIN
PageSidebar Create (0.000313) INSERT INTO sidebars ("config", "staged_position", "type", "active_position") VALUES(E'---
maximum_pages: 10
', NULL, E'PageSidebar', NULL)
SQL (0.000168) SELECT currval('sidebars_id_seq')
Blog Load (0.000286) SELECT * FROM blogs ORDER BY id LIMIT 1
CACHE (0.000000) SELECT * FROM blogs ORDER BY id LIMIT 1
SQL (0.000133) ROLLBACK
ArgumentError (A copy of BlogSweeper has been removed from the module tree but is still active!):
/vendor/rails/activesupport/lib/active_support/dependencies.rb:237:in `load_missing_constant'
/vendor/rails/activesupport/lib/active_support/dependencies.rb:469:in `const_missing'
/app/models/blog_sweeper.rb:88:in `sweep_pages'
/app/models/blog_sweeper.rb:10:in `send'
/app/models/blog_sweeper.rb:10:in `run_pending_page_sweeps'
/usr/lib/ruby/1.8/set.rb:189:in `each'
/usr/lib/ruby/1.8/set.rb:189:in `each_key'
/usr/lib/ruby/1.8/set.rb:189:in `each'
/app/models/blog_sweeper.rb:9:in `run_pending_page_sweeps'
/app/models/blog_sweeper.rb:57:in `expire_for'
/app/models/blog_sweeper.rb:36:in `after_save'
/vendor/rails/activerecord/lib/active_record/observer.rb:157:in `send'
/vendor/rails/activerecord/lib/active_record/observer.rb:157:in `update'
/usr/lib/ruby/1.8/observer.rb:185:in `notify_observers'
/usr/lib/ruby/1.8/observer.rb:184:in `each'
/usr/lib/ruby/1.8/observer.rb:184:in `notify_observers'
/vendor/rails/activerecord/lib/active_record/callbacks.rb:338:in `notify'
/vendor/rails/activerecord/lib/active_record/callbacks.rb:302:in `callback'
/vendor/rails/activerecord/lib/active_record/callbacks.rb:214:in `create_or_update'
/vendor/rails/activerecord/lib/active_record/base.rb:1995:in `save_without_validation!'
/vendor/rails/activerecord/lib/active_record/validations.rb:946:in `save_without_transactions!'
/vendor/rails/activerecord/lib/active_record/transactions.rb:110:in `save!'
/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:66:in `transaction'
/vendor/rails/activerecord/lib/active_record/transactions.rb:79:in `transaction'
/vendor/rails/activerecord/lib/active_record/transactions.rb:98:in `transaction'
/vendor/rails/activerecord/lib/active_record/transactions.rb:110:in `save!'
/vendor/rails/activerecord/lib/active_record/transactions.rb:118:in `rollback_active_record_state!'
/vendor/rails/activerecord/lib/active_record/transactions.rb:110:in `save!'
/vendor/rails/activerecord/lib/active_record/validations.rb:911:in `create!'
/app/controllers/admin/sidebar_controller.rb:26:in `set_active'
/vendor/rails/activerecord/lib/active_record/base.rb:1762:in `inject'
/app/controllers/admin/sidebar_controller.rb:24:in `each'
/app/controllers/admin/sidebar_controller.rb:24:in `inject'
/app/controllers/admin/sidebar_controller.rb:24:in `set_active'
/vendor/rails/actionpack/lib/action_controller/base.rb:1159:in `send'
/vendor/rails/actionpack/lib/action_controller/base.rb:1159:in `perform_action_without_filters'
/vendor/rails/actionpack/lib/action_controller/filters.rb:699:in `call_filters'
/vendor/rails/actionpack/lib/action_controller/filters.rb:727:in `run_before_filters'
/vendor/rails/actionpack/lib/action_controller/filters.rb:666:in `call'
/vendor/rails/actionpack/lib/action_controller/filters.rb:666:in `proxy_before_and_after_filter'
/vendor/rails/actionpack/lib/action_controller/filters.rb:483:in `call'
/vendor/rails/actionpack/lib/action_controller/filters.rb:483:in `call'
/vendor/rails/actionpack/lib/action_controller/filters.rb:724:in `run_before_filters'
/vendor/rails/actionpack/lib/action_controller/filters.rb:697:in `call_filters'
/vendor/rails/actionpack/lib/action_controller/filters.rb:691:in `perform_action_without_benchmark'
/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
/usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
/vendor/rails/actionpack/lib/action_controller/rescue.rb:199:in `perform_action_without_caching'
/vendor/rails/actionpack/lib/action_controller/caching.rb:678:in `perform_action'
/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:33:in `cache'
/vendor/rails/activerecord/lib/active_record/query_cache.rb:8:in `cache'
/vendor/rails/actionpack/lib/action_controller/caching.rb:677:in `perform_action'
/vendor/rails/actionpack/lib/action_controller/base.rb:524:in `send'
/vendor/rails/actionpack/lib/action_controller/base.rb:524:in `process_without_filters'
/vendor/rails/actionpack/lib/action_controller/filters.rb:687:in `process_without_session_management_support'
/vendor/rails/actionpack/lib/action_controller/session_management.rb:123:in `process'
/vendor/rails/actionpack/lib/action_controller/base.rb:388:in `process'
/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:171:in `handle_request'
/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:115:in `dispatch'
/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:126:in `dispatch_cgi'
/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:9:in `dispatch'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/bin/../lib/mongrel/rails.rb:76:in `process'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/bin/../lib/mongrel/rails.rb:74:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/bin/../lib/mongrel/rails.rb:74:in `process'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel.rb:159:in `process_client'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel.rb:158:in `each'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel.rb:158:in `process_client'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel.rb:285:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel.rb:285:in `initialize'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel.rb:285:in `new'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel.rb:285:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel.rb:268:in `initialize'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel.rb:268:in `new'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel.rb:268:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel/configurator.rb:282:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel/configurator.rb:281:in `each'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel/configurator.rb:281:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/bin/mongrel_rails:128:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/lib/mongrel/command.rb:212:in `run'
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.3/bin/mongrel_rails:281
/vendor/rails/activesupport/lib/active_support/dependencies.rb:489:in `load'
/vendor/rails/activesupport/lib/active_support/dependencies.rb:489:in `load'
/vendor/rails/activesupport/lib/active_support/dependencies.rb:342:in `new_constants_in'
/vendor/rails/activesupport/lib/active_support/dependencies.rb:489:in `load'
/vendor/rails/railties/lib/commands/servers/mongrel.rb:64
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
/vendor/rails/activesupport/lib/active_support/dependencies.rb:496:in `require'
/vendor/rails/activesupport/lib/active_support/dependencies.rb:342:in `new_constants_in'
/vendor/rails/activesupport/lib/active_support/dependencies.rb:496:in `require'
/vendor/rails/railties/lib/commands/server.rb:39
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
./script/server:3
Rendering /home/shingara/perso/project/typo_trunk/vendor/rails/actionpack/lib/action_controller/templates/rescues/layout.erb (internal_server_error)
History
08/09/2008 11:24 AM - Cyril Mougel
After research, I found a blog post speak about this problem :
http://www.jamesmurty.com/2008/03/19/ruby_on_rails_background_threads/
This error is about cache made or not by rails. So if you want that your application in developpment work, you need update the /config/environments/developpement.rb
inside, change the config.cache_classes to true otherwise false. It's not a really good way to solve this problem.
