Hi guys,

I am stuck on, what i think is a class loader issue.

In my app/models directory i have the following files:

reductions/base.rb
reductions/conversions_by_bucket.rb
reductions/conversions_by_hour.rb
reductions/impressions_by_hour.rb

(background -- i am using mongoid, and i use these files to manage
mapReduce)

These classes only have class methods.  In each of these classes I
added the following method:

def self.hello
  "hello"
end

And checkout this weirdness from the rails console:

> Reductions::ImpressionsByHour.hello
=> "hello"
> Reductions::ConversionsByHour.hello
=> "hello"
> Reductions::ImpressionsByBucket.hello

NoMethodError: undefined method `hello' for
Reductions::ImpressionsByBucket:Class

BUT ...

> require 'reductions/conversions_by_bucket.rb'
=> nil
> Reductions::ConversionsByBucket.hello
=> "hello"

Soooooo weird!!!  So why is reductions/conversions_by_bucket.rb not
being loaded by the class loader?!

I am using rails 3.0.3

Thanks!!








-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to