I see this error in the delayed work on the hero, and it makes no sense to me:
{uninitialized constant Less::Engine (in /app/app/assets/stylesheets/share_and_earn_recommendation_email.css.less) /app/vendor/bundle/ruby/1.9.1/gems/tilt-1.3.3/lib/tilt/css.rb:60:in `prepare' ...
Why doesn’t it make sense? Since css.rb looks like this:
def prepare if ::Less.const_defined? :Engine @engine = ::Less::Engine.new(data)
This means that it is impossible to get to line 60 if Less::Engine is undefined. What am I missing?
EDIT
Even better demo from heroku console:
irb(main):008:0> ::Less.const_defined? :Engine => true irb(main):009:0> ::Less::Engine NameError: uninitialized constant Less::Engine
EDIT 2
This is becoming more interesting:
irb(main):011:0> ::Less.const_defined? :Engine, false => false
The difference is that the latter is not looking for ancestors. But there are no ancestors, so this should not matter:
irb(main):012:0> ::Less.ancestors => [Less]
source share