jeremyevans / home_run

Fast Date/DateTime classes for ruby :: Unmaintained, unnecessary on ruby 1.9.3+
Other
465 stars 10 forks source link

uninitialized constant DateTime #25

Closed mrinterweb closed 13 years ago

mrinterweb commented 13 years ago

I thought I would give home_run a try. I first ran my specs to make sure they were passing. I then installed home_run with home_run --install. I ran my specs again and it bombed out with uninitialized constant DateTime. I then ran home_run --uninstall. I ran my specs again and now I get undefined methodadvance' for #<Date 2011-03-19>`.

The only way I can think to fix this is to uninstall my ruby version, reinstall it and all of my gems, and avoid using home_run until this has been adressed.

Below is the backtrace for the first error:

rake aborted!
uninitialized constant DateTime
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/activesupport-2.3.10/lib/active_support/dependencies.rb:469:in `load_missing_constant'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/activesupport-2.3.10/lib/active_support/dependencies.rb:106:in `const_missing_not_from_s3_library'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/bundler/gems/aws-s3-268f21d580e6/lib/aws/s3/extensions.rb:206:in `const_missing'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/activesupport-2.3.10/lib/active_support/dependencies.rb:118:in `const_missing'
/Users/sean/projects/crowdcompass_rails/spec/factories.rb:59
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/factory_girl-1.3.3/lib/factory_girl/factory.rb:56:in `define'
/Users/sean/projects/crowdcompass_rails/spec/factories.rb:54
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/activesupport-2.3.10/lib/active_support/dependencies.rb:182:in `require'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/activesupport-2.3.10/lib/active_support/dependencies.rb:182:in `require'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/activesupport-2.3.10/lib/active_support/dependencies.rb:547:in `new_constants_in'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/activesupport-2.3.10/lib/active_support/dependencies.rb:182:in `require'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/factory_girl-1.3.3/lib/factory_girl/factory.rb:310:in `find_definitions'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/factory_girl-1.3.3/lib/factory_girl/factory.rb:308:in `each'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/factory_girl-1.3.3/lib/factory_girl/factory.rb:308:in `find_definitions'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/factory_girl-1.3.3/lib/factory_girl/rails2.rb:1
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rails-2.3.10/lib/initializer.rb:614:in `call'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rails-2.3.10/lib/initializer.rb:614:in `after_initialize'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rails-2.3.10/lib/initializer.rb:613:in `each'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rails-2.3.10/lib/initializer.rb:613:in `after_initialize'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rails-2.3.10/lib/initializer.rb:179:in `process'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rails-2.3.10/lib/initializer.rb:113:in `send'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rails-2.3.10/lib/initializer.rb:113:in `run'
/Users/sean/projects/crowdcompass_rails/config/environment.rb:22
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/activesupport-2.3.10/lib/active_support/dependencies.rb:182:in `require'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/activesupport-2.3.10/lib/active_support/dependencies.rb:182:in `require'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/activesupport-2.3.10/lib/active_support/dependencies.rb:547:in `new_constants_in'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/activesupport-2.3.10/lib/active_support/dependencies.rb:182:in `require'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rails-2.3.10/lib/tasks/misc.rake:4
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/lib/rake.rb:636:in `execute'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain'
/Users/sean/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/lib/rake.rb:607:in `invoke_prerequisites'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/lib/rake.rb:604:in `each'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/lib/rake.rb:604:in `invoke_prerequisites'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/lib/rake.rb:596:in `invoke_with_call_chain'
/Users/sean/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/lib/rake.rb:607:in `invoke_prerequisites'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/lib/rake.rb:604:in `each'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/lib/rake.rb:604:in `invoke_prerequisites'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/lib/rake.rb:596:in `invoke_with_call_chain'
/Users/sean/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/lib/rake.rb:607:in `invoke_prerequisites'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/lib/rake.rb:604:in `each'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/lib/rake.rb:604:in `invoke_prerequisites'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/lib/rake.rb:596:in `invoke_with_call_chain'
/Users/sean/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/bin/rake:31
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/bin/rake:19:in `load'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/bin/rake:19

When I ran home_run --uninstall

rm -f /Users/sean/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/site_ruby/1.8/date.rb
rm -f /Users/sean/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/site_ruby/1.8/date/format.rb
rmdir /Users/sean/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/site_ruby/1.8/date
rm -f /Users/sean/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/site_ruby/1.8/i686-darwin10.6.0/date_ext.bundle
rm -f /Users/sean/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/site_ruby/1.8/i686-darwin10.6.0/1.8/date_ext.so
rmdir /Users/sean/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/site_ruby/1.8/i686-darwin10.6.0/1.8
rm -f /Users/sean/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/site_ruby/1.8/i686-darwin10.6.0/1.9/date_ext.so
rmdir /Users/sean/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/site_ruby/1.8/i686-darwin10.6.0/1.9

Running my specs after I uninstalled home_run:

rake aborted!
undefined method `advance' for #
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/activesupport-2.3.10/lib/active_support/core_ext/time/calculations.rb:113:in`advance'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/activesupport-2.3.10/lib/active_support/duration.rb:86:in `sum'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/activesupport-2.3.10/lib/active_support/dependencies.rb:406:in`inject'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/activesupport-2.3.10/lib/active_support/duration.rb:81:in `each'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/activesupport-2.3.10/lib/active_support/duration.rb:81:in`inject'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/activesupport-2.3.10/lib/active_support/duration.rb:81:in `sum'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/activesupport-2.3.10/lib/active_support/duration.rb:64:in`until'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/activesupport-2.3.10/lib/active_support/core_ext/time/calculations.rb:284:in `minus_without_coercion'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/activesupport-2.3.10/lib/active_support/core_ext/time/calculations.rb:295:in`-'
/Users/sean/projects/crowdcompass_rails/spec/factories.rb:77
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/factory_girl-1.3.3/lib/factory_girl/factory.rb:56:in `define'
/Users/sean/projects/crowdcompass_rails/spec/factories.rb:71
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/activesupport-2.3.10/lib/active_support/dependencies.rb:182:in`require'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/activesupport-2.3.10/lib/active_support/dependencies.rb:182:in `require'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/activesupport-2.3.10/lib/active_support/dependencies.rb:547:in`new_constants_in'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/activesupport-2.3.10/lib/active_support/dependencies.rb:182:in `require'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/factory_girl-1.3.3/lib/factory_girl/factory.rb:310:in`find_definitions'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/factory_girl-1.3.3/lib/factory_girl/factory.rb:308:in `each'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/factory_girl-1.3.3/lib/factory_girl/factory.rb:308:in`find_definitions'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/factory_girl-1.3.3/lib/factory_girl/rails2.rb:1
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rails-2.3.10/lib/initializer.rb:614:in `call'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rails-2.3.10/lib/initializer.rb:614:in`after_initialize'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rails-2.3.10/lib/initializer.rb:613:in `each'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rails-2.3.10/lib/initializer.rb:613:in`after_initialize'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rails-2.3.10/lib/initializer.rb:179:in `process'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rails-2.3.10/lib/initializer.rb:113:in`send'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rails-2.3.10/lib/initializer.rb:113:in `run'
/Users/sean/projects/crowdcompass_rails/config/environment.rb:22
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/activesupport-2.3.10/lib/active_support/dependencies.rb:182:in`require'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/activesupport-2.3.10/lib/active_support/dependencies.rb:182:in `require'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/activesupport-2.3.10/lib/active_support/dependencies.rb:547:in`new_constants_in'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/activesupport-2.3.10/lib/active_support/dependencies.rb:182:in `require'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rails-2.3.10/lib/tasks/misc.rake:4
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/lib/rake.rb:636:in`call'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/lib/rake.rb:636:in `execute'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/lib/rake.rb:631:in`each'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/lib/rake.rb:597:in`invoke_with_call_chain'
/Users/sean/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/lib/rake.rb:590:in`invoke_with_call_chain'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/lib/rake.rb:607:in `invoke_prerequisites'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/lib/rake.rb:604:in`each'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/lib/rake.rb:604:in `invoke_prerequisites'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/lib/rake.rb:596:in`invoke_with_call_chain'
/Users/sean/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/lib/rake.rb:590:in`invoke_with_call_chain'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/lib/rake.rb:607:in `invoke_prerequisites'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/lib/rake.rb:604:in`each'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/lib/rake.rb:604:in `invoke_prerequisites'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/lib/rake.rb:596:in`invoke_with_call_chain'
/Users/sean/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/lib/rake.rb:590:in`invoke_with_call_chain'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/lib/rake.rb:607:in `invoke_prerequisites'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/lib/rake.rb:604:in`each'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/lib/rake.rb:604:in `invoke_prerequisites'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/lib/rake.rb:596:in`invoke_with_call_chain'
/Users/sean/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/lib/rake.rb:590:in`invoke_with_call_chain'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/lib/rake.rb:2051:in`invoke_task'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/lib/rake.rb:2029:in`each'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/lib/rake.rb:2068:in`standard_exception_handling'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/lib/rake.rb:2001:in`run'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/lib/rake.rb:1998:in`run'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rake-0.8.7/bin/rake:31
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/bin/rake:19:in `load'
/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/bin/rake:19
            
mrinterweb commented 13 years ago

After I uninstalled ruby, and reinstalled ruby and my gems (minus home_run), my specs work again. This should prove that the home_run uninstaller does not restore ruby to its previous state.

jeremyevans commented 13 years ago

home_run --uninstall does the exact opposite of home_run --install. It does not uninstall the gem, so to fully remove home run, you need to gem uninstall home_run after running home_run --uninstall. Instead of uninstalling and reinstalling ruby and your gems, you could probably just have uninstalled the gem.

Looking at your backtrace, the uninitialized constant error is coming from a factory in your specs, and going through two different overrides of const_missing (one from ActiveSupport, one from S3). It's likely the problem is in that code. home_run does define DateTime, so if those const_missing overrides can't find it, it's probably a problem with them. Most likely, they are trying to require a date_time.rb file (you could strace/ktrace the process to see what they are actually doing).

You may be able to work around the issue by adding a require 'date' somewhere earlier in your config/environment.rb file (before line 22). That may help to ensure that DateTime is already defined so any references to DateTime don't go through const_missing.

mrinterweb commented 13 years ago

Ok. If I include home_run in my Gemfile, and run my specs with bundle exec spec spec/* it fails with

/Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/activesupport-2.3.10/lib/active_support/core_ext/date/calculations.rb:10:in `alias_method': undefined method`+' for class `Date' (NameError)
    from /Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/activesupport-2.3.10/lib/active_support/core_ext/date/calculations.rb:10:in`included'
    from /Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/activesupport-2.3.10/lib/active_support/core_ext/date/calculations.rb:9:in `instance_eval'
    from /Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/activesupport-2.3.10/lib/active_support/core_ext/date/calculations.rb:9:in`included'
    from /Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/activesupport-2.3.10/lib/active_support/core_ext/date.rb:8:in `include'
    from /Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/activesupport-2.3.10/lib/active_support/core_ext/date.rb:8
    from /Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/activesupport-2.3.10/lib/active_support/core_ext.rb:8:in`require'
    from /Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/activesupport-2.3.10/lib/active_support/core_ext.rb:8
    from /Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/activesupport-2.3.10/lib/active_support/core_ext.rb:8:in `each'
    from /Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/activesupport-2.3.10/lib/active_support/core_ext.rb:8
    from /Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/activesupport-2.3.10/lib/active_support.rb:56:in`require'
    from /Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/activesupport-2.3.10/lib/active_support.rb:56
    from /Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/actionpack-2.3.10/lib/action_controller.rb:25:in `require'
    from /Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/actionpack-2.3.10/lib/action_controller.rb:25
    from /Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rails-2.3.10/lib/initializer.rb:965:in`require'
    from /Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rails-2.3.10/lib/initializer.rb:965:in `middleware'
    from /Users/sean/projects/crowdcompass_rails/spec/../config/environment.rb:79
    from /Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rails-2.3.10/lib/initializer.rb:111:in`run'
    from /Users/sean/projects/crowdcompass_rails/spec/../config/environment.rb:12
    from /Users/sean/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
    from /Users/sean/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in`require'
    from /Users/sean/projects/crowdcompass_rails/spec/spec_helper.rb:15
    from /Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/spork-0.8.4/lib/spork.rb:23:in `prefork'
    from /Users/sean/projects/crowdcompass_rails/spec/spec_helper.rb:6
    from /Users/sean/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in`gem_original_require'
    from /Users/sean/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
    from ./spec/models/activity_spec.rb:1
    from /Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rspec-1.3.1/lib/spec/runner/example_group_runner.rb:15:in`load'
    from /Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rspec-1.3.1/lib/spec/runner/example_group_runner.rb:15:in `load_files'
    from /Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rspec-1.3.1/lib/spec/runner/example_group_runner.rb:14:in`each'
    from /Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rspec-1.3.1/lib/spec/runner/example_group_runner.rb:14:in `load_files'
    from /Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rspec-1.3.1/lib/spec/runner/options.rb:134:in`run_examples'
    from /Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rspec-1.3.1/lib/spec/runner/command_line.rb:9:in `run'
    from /Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/gems/rspec-1.3.1/bin/spec:5
    from /Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/bin/spec:19:in`load'
    from /Users/sean/.rvm/gems/ree-1.8.7-2011.03@crowdcompass_app/bin/spec:19

If I do not have home_run in my bundler Gemfile, and run the same spec with bundle exec, it works.  I do believe that it would not be using home_run in that case.

I did try including `require 'date'` in my environment.rb file and that did not seem to effect things.            
jeremyevans commented 13 years ago

The NameError for Date#+ is most likely because the ActiveSupport date extensions got loaded before home_run. Did you use home_run --install?

Basically, home_run --install puts the home_run files in site_ruby, which is earlier in the load path than the stdlib directory by default. It's possible for poorly coded software to still load the stdlib files instead of the files in the site_ruby directory, and that can cause problems, but that situation is fairly rare.

The alternative to home_run --install is using home_run command (e.g. home_run irb), but I'm not sure if that would interact well with bundler.

Try using home_run --install with the require 'date' in environment.rb and see if that makes any difference. If not and the app you are working on is open source, let me know where I can download it to attempt to troubleshoot the issue.

mrinterweb commented 13 years ago

The first thing I did when I tried home_run again was to install home_run home_run --install. I have tried running my code with bundle exec home_run spec spec/models/foo.rb That did not work for me either. I have also added require 'date' before line 22 in my environment.rb. That did not make a difference.

Unfortunately, the code I'm working on is not open source so I can't reveal much. I do think that home_run would be a good fit for my application because a big part of my application is an API for synchronizing content to client devices. So an improved DateTime library would likely be a big plus for my application. My app is fairly large, and has many gem dependencies. Tracking down the culprit may be difficult.

jeremyevans commented 13 years ago

That's unfortunate. One possible workaround is to remove the stdlib date library completely, so that it cannot be loaded at all. To do so, you need to remove the date.rb and date/format.rb file from the stdlib directory. If you use home_run --install to add it to site_ruby, and remove the stdlib date completely, that may fix the issue.

Unfortunately, that's the only thing I can think of. If you do find the underlying cause and you believe it to be a bug in home_run, please reopen this ticket.

mrinterweb commented 13 years ago

Thanks for the help, Jeremy.