I recently ran into an odd error that only occurred in production mode.
I was using the paths of glory gem that defines the class Achievement (http://github.com/paulca/paths_of_glory/blob/master/app/models/achievement.rb).
In the base class, level is defined:
def level(level, options = {})
levels << {:level => level, :quota => options[:quota]}
end
The paths of glory gem works by having you create models that inherit from the base achievement model.
In an effort to add an additional method to the base Achievement class, we (erroneously, in retrospect) created a new models/aachievements.rb (yes, intentional spelling error, since Rails will try to load Achievement if we called it achievements.rb) file, however, rather than re-opening the class, we redefined the class. Because our redefinition didn't include level, when we deployed to production, we hit an error that level was an undef method.
The question is, why didn't this error manifest itself in development mode? The gem and classes were the same in both.
Any ideas?