Created
February 4, 2009 04:19
-
-
Save logankoester/57929 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I’ve installed daemon_generator to my app running a fairly recent edge rails. It works fine until I try to use ActiveRecord in the daemon: | |
while($running) do pp User.all sleep 10 end | |
$ lib/daemons/twitterusers_ctl run /home/logankoester/projects/paul/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:212:in `log’: NoMethodError: undefined method `ms’ for Benchmark:Module: SELECT * FROM “users” (ActiveRecord::StatementInvalid) from /home/logankoester/projects/paul/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb:132:in `execute’ from /home/logankoester/projects/paul/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb:372:in `catch_schema_changes’ from /home/logankoester/projects/paul/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb:132:in `execute’ from /home/logankoester/projects/paul/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb:275:in `select’ from /home/logankoester/projects/paul/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:7:in `select_all_without_query_cache’ from /home/logankoester/projects/paul/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:62:in `select_all’ from /home/logankoester/projects/paul/vendor/rails/activerecord/lib/active_record/base.rb:660:in `find_by_sql’ from /home/logankoester/projects/paul/vendor/rails/activerecord/lib/active_record/base.rb:1530:in `find_every’ from /home/logankoester/projects/paul/vendor/rails/activerecord/lib/active_record/base.rb:614:in `find’ from /home/logankoester/projects/paul/vendor/rails/activerecord/lib/active_record/base.rb:634:in `all’ from /home/logankoester/projects/paul/lib/daemons/twitterusers.rb:13 from /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:142:in `load_without_new_constant_marking’ from /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:142:in `load’ from /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:521:in `new_constants_in’ from /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:142:in `load’ from /usr/lib/ruby/gems/1.8/gems/daemons-1.0.10/lib/daemons/application.rb:176:in `start_load’ from /usr/lib/ruby/gems/1.8/gems/daemons-1.0.10/lib/daemons/application.rb:257:in `start’ from /usr/lib/ruby/gems/1.8/gems/daemons-1.0.10/lib/daemons/controller.rb:72:in `run’ from /usr/lib/ruby/gems/1.8/gems/daemons-1.0.10/lib/daemons.rb:139:in `run’ from /usr/lib/ruby/gems/1.8/gems/daemons-1.0.10/lib/daemons/cmdline.rb:105:in `call’ from /usr/lib/ruby/gems/1.8/gems/daemons-1.0.10/lib/daemons/cmdline.rb:105:in `catch_exceptions’ from /usr/lib/ruby/gems/1.8/gems/daemons-1.0.10/lib/daemons.rb:138:in `run’ from lib/daemons/twitterusers_ctl:25 | |
I created a new application to test this in and it works correctly using gemrails 2.2.2, but when I freeze to edge (newer edge than my app is running) I get a different error: | |
$ lib/daemons/monkey_monitor_ctl run /home/logankoester/projects/daemongentest/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:50: undefined method `available_locales’ for I18n:Module (NoMethodError) from /home/logankoester/projects/daemongentest/vendor/rails/actionpack/lib/action_view/template.rb:240:in `split’ from /home/logankoester/projects/daemongentest/vendor/rails/actionpack/lib/action_view/template.rb:103:in `initialize’ from /home/logankoester/projects/daemongentest/vendor/rails/actionpack/lib/action_view/template.rb:58:in `new’ from /home/logankoester/projects/daemongentest/vendor/rails/actionpack/lib/action_view/template.rb:58:in `create_template’ from /home/logankoester/projects/daemongentest/vendor/rails/actionpack/lib/action_view/template.rb:53:in `templates_in_path’ from /home/logankoester/projects/daemongentest/vendor/rails/actionpack/lib/action_view/template.rb:52:in `each’ from /home/logankoester/projects/daemongentest/vendor/rails/actionpack/lib/action_view/template.rb:52:in `templates_in_path’ from /home/logankoester/projects/daemongentest/vendor/rails/actionpack/lib/action_view/template.rb:67:in `initialize’ from /home/logankoester/projects/daemongentest/vendor/rails/actionpack/lib/action_controller/rescue.rb:41:in `new’ from /home/logankoester/projects/daemongentest/vendor/rails/actionpack/lib/action_controller/rescue.rb:41 from /home/logankoester/projects/daemongentest/vendor/rails/actionpack/lib/action_controller/base.rb:1345 from /home/logankoester/projects/daemongentest/vendor/rails/actionpack/lib/action_controller/base.rb:1344:in `class_eval’ from /home/logankoester/projects/daemongentest/vendor/rails/actionpack/lib/action_controller/base.rb:1344 from (eval):10 from (eval):7:in `each’ from (eval):7 from /home/logankoester/projects/daemongentest/vendor/rails/actionpack/lib/action_controller/middleware_stack.rb:75:in `call’ from /home/logankoester/projects/daemongentest/vendor/rails/actionpack/lib/action_controller/middleware_stack.rb:75:in `initialize’ from /home/logankoester/projects/daemongentest/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:48:in `new’ from /home/logankoester/projects/daemongentest/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:48 from /home/logankoester/projects/daemongentest/lib/daemons/../../config/../vendor/rails/railties/lib/initializer.rb:894:in `middleware’ from /home/logankoester/projects/daemongentest/lib/daemons/../../config/../vendor/rails/railties/lib/initializer.rb:412:in `initialize_database’ from /home/logankoester/projects/daemongentest/lib/daemons/../../config/../vendor/rails/railties/lib/initializer.rb:141:in `process’ from /home/logankoester/projects/daemongentest/lib/daemons/../../config/../vendor/rails/railties/lib/initializer.rb:113:in `send’ from /home/logankoester/projects/daemongentest/lib/daemons/../../config/../vendor/rails/railties/lib/initializer.rb:113:in `run’ from /home/logankoester/projects/daemongentest/lib/daemons/../../config/environment.rb:13 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require’ from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require’ from /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:153:in `require’ from /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:521:in `new_constants_in’ from /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:153:in `require’ from /home/logankoester/projects/daemongentest/lib/daemons/monkey_monitor.rb:6 from /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:142:in `load_without_new_constant_marking’ from /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:142:in `load’ from /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:521:in `new_constants_in’ from /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:142:in `load’ from /usr/lib/ruby/gems/1.8/gems/daemons-1.0.10/lib/daemons/application.rb:176:in `start_load’ from /usr/lib/ruby/gems/1.8/gems/daemons-1.0.10/lib/daemons/application.rb:257:in `start’ from /usr/lib/ruby/gems/1.8/gems/daemons-1.0.10/lib/daemons/controller.rb:72:in `run’ from /usr/lib/ruby/gems/1.8/gems/daemons-1.0.10/lib/daemons.rb:139:in `run’ from /usr/lib/ruby/gems/1.8/gems/daemons-1.0.10/lib/daemons/cmdline.rb:105:in `call’ from /usr/lib/ruby/gems/1.8/gems/daemons-1.0.10/lib/daemons/cmdline.rb:105:in `catch_exceptions’ from /usr/lib/ruby/gems/1.8/gems/daemons-1.0.10/lib/daemons.rb:138:in `run’ from lib/daemons/monkey_monitor_ctl:25 | |
What are your thoughts? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment