我已經安裝了Puppet的官方文檔,我已經安裝了Ruby 1.8.7。Puppet與Apache集成,但無法啓動,因爲紅寶石
但是通過rvm我已經安裝了ruby 2.3.3,然後安裝了機架和乘客寶石gem install rack passenger
併成功安裝passenger-install-apache2-module
。
我對puppetmaster.conf進行了相應的修改,並將其放在httpd服務的conf.d目錄中。
啓動httpd服務我已經給出puppet cert
及以下的錯誤及其表現後
[[email protected] puppet-fundamentals-puppetmaster]# puppet cert
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- json (L
oadError)
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31: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:31:in `gem_original_require'
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31: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:31:in `gem_original_require'
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31: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:31:in `gem_original_require'
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31: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:31:in `gem_original_require'
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31: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:31:in `gem_original_require'
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31: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:31:in `gem_original_require'
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31: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:31:in `gem_original_require'
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31: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:31:in `gem_original_require'
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31: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:31:in `gem_original_require'
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /usr/lib/ruby/site_ruby/1.8/puppet.rb:282
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /usr/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:12
from /usr/bin/puppet:7:in `require'
我不明白爲什麼木偶還在找了紅寶石1.8甚至我曾提到在puppetmaster.conf
PassengerRoot /usr/local/rvm/gems/ruby-2.3.3/gems/passenger-5.1.2
PassengerDefaultRuby /usr/local/rvm/gems/ruby-2.3.3/wrappers/ruby
有沒有什麼辦法可以告訴Puppet查看ruby-2.3.3作爲默認ruby的所有需求?
[[email protected] ~]# puppet --version
3.8.7
[[email protected] ~]#
[[email protected] ~]# ruby -v
ruby 2.3.3p222 (2016-11-21 revision 56859) [x86_64-linux]
[[email protected] ~]# rvm all ruby list
rvm rubies
=* ruby-2.3.3 [ x86_64 ]
謝謝。
我不相信木偶3.8.7支持Ruby 2.3,甚至2.2紅寶石。嘗試升級到支持/非過時版本的Puppet。 –
@MattSchuchard謝謝 –
實際上我可以在這裏提出其他一些事情,但據我記得Puppet 3.x針對Ruby 1.9,也許2.0,並且不太可能2.1。 –