I've found the root cause. For some reason we have broken rubygem-yajl-ruby package. In 6.1 we have 1.1.0-1.el6 and it works fine. In 7.0 and 8.0 we have 1.1.0-2~1.el6.mira3 and it is broken.
it should be "require 'yajl/yajl'" instead of "require 'yajl'" in the first line of the /usr/lib/ruby/gems/1.8/gems/yajl-ruby-1.1.0/lib/yajl.rb file. Ohai works fine with this fix.
I've found the root cause. For some reason we have broken rubygem-yajl-ruby package. In 6.1 we have 1.1.0-1.el6 and it works fine. In 7.0 and 8.0 we have 1.1.0-2~1.el6.mira3 and it is broken.
it should be "require 'yajl/yajl'" instead of "require 'yajl'" in the first line of the /usr/lib/ ruby/gems/ 1.8/gems/ yajl-ruby- 1.1.0/lib/ yajl.rb file. Ohai works fine with this fix.