I have an application that is using active record outside of rails. the
app
works fine w/o the activerecord code, but when I added activerecord to
the
mix I started having trouble with constants not being recognized, e.g.:
[echo] 1) Error:
[echo]
test_pipeline_cruncher(IntradayCruncher::TestPipelineCruncher):
[echo] NameError: uninitialized constant INFO
[echo]
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/depend
encies.rb:200:in `const_missing’
It seems like there is a clash between our Log4r and ActiveRecord
constants.
Any thoughts?
Phil S. wrote:
Any thoughts?
Can you possibly give us a larger backtrace? Instead of just in
dependencies.rb
Sure thing:
test:
[exec] Result: 1
[echo] Test Output:
[echo] Database Connection established
[echo] Loaded suite
C:/dev/build/app/IntradayCruncher/test/ts_intraday_cruncher
[echo] Started
[echo] …EE
[echo] Finished in 0.75 seconds.
[echo]
[echo] 1) Error:
[echo]
test_pipeline_cruncher(IntradayCruncher::TestPipelineCruncher):
[echo] NameError: uninitialized constant INFO
[echo]
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/depend
encies.rb:200:in const_miss ing' [echo] C:\dev\build\app\IntradayCruncher\lib\common/logging.rb:40:in
init_loggers’
[echo]
C:\dev\build\app\IntradayCruncher\test/tc_pipeline_cruncher.rb:34:in
test_pipeline_cruncher' [echo] [echo] 2) Error: [echo] test_time_cruncher(IntradayCruncher::TestTimeCruncher): [echo] NameError: uninitialized constant INFO [echo] c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/depend encies.rb:195:in
const_miss
ing’
[echo]
C:\dev\build\app\IntradayCruncher\lib\common/logging.rb:40:in
init_loggers' [echo] C:\dev\build\app\IntradayCruncher\test/tc_time_cruncher.rb:31:in
test_time_cruncher’
[echo]
[echo] 5 tests, 3 assertions, 0 failures, 2 errors