首页 > 代码库 > custom_require.rb:36:in `gem_original_require': no such file to load -- json (LoadError)

custom_require.rb:36:in `gem_original_require': no such file to load -- json (LoadError)

 

[root@puppetmaster ~]#  /etc/init.d/puppetmaster start

Starting puppetmaster: /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require‘: no such file to load -- json (LoadError)

from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require‘

from /usr/lib/ruby/site_ruby/1.8/puppet/module.rb:3

from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require‘

from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require‘

from /usr/lib/ruby/site_ruby/1.8/puppet/parser/files.rb:1

from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require‘

from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require‘

from /usr/lib/ruby/site_ruby/1.8/puppet/parser/templatewrapper.rb:1

from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require‘

from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require‘

from /usr/lib/ruby/site_ruby/1.8/puppet/parser/scope.rb:6

from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require‘

from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require‘

from /usr/lib/ruby/site_ruby/1.8/puppet/parser/methods.rb:2

from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require‘

from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require‘

from /usr/lib/ruby/site_ruby/1.8/puppet/parser/ast/method_call.rb:2

from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require‘

from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require‘

from /usr/lib/ruby/site_ruby/1.8/puppet/parser/ast.rb:115

from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require‘

from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require‘

from /usr/lib/ruby/site_ruby/1.8/puppet/parser/parser.rb:11

from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require‘

from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require‘

from /usr/lib/ruby/site_ruby/1.8/puppet/parser.rb:4

from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require‘

from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require‘

from /usr/lib/ruby/site_ruby/1.8/puppet.rb:260

from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require‘

from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require‘

from /usr/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:12

from /usr/bin/puppet:7:in `require‘

from /usr/bin/puppet:7

                                                           [FAILED]

启动失败并报错

报错的重点是第一句,提示no such file to load -- json (LoadError),意思好像是因为json没有安装,也有可能是没有可ruby关联上

解决办法:

重新安装json,

[root@puppetmaster ~]#

Fetching: json-1.8.1.gem (100%)

Building native extensions.  This could take a while...

Successfully installed json-1.8.1

1 gem installed

Installing ri documentation for json-1.8.1...

Installing RDoc documentation for json-1.8.1...

重新启动puppet和puppetmaster成功!

本文出自 “知识标记” 博客,请务必保留此出处http://mavis.blog.51cto.com/8653878/1550571

custom_require.rb:36:in `gem_original_require': no such file to load -- json (LoadError)