Ruby : Cipher is not a module (TypeError)
After re-install the puppet client I got an error while restart the puppet.
Error:-
=-=-=-=
Starting puppet: /usr/lib/ruby/1.8/openssl/cipher.rb:22: Cipher is not a module (TypeError)
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/1.8/openssl.rb:20
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/ssl.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.rb:160
from /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:271:in `require’
from /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:271:in `initialize’
from /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:230:in `new’
from /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:230:in `[]’
from /usr/sbin/puppetd:4
[FAILED]
root@ [~]# rpm -qi ruby
Name : ruby Relocations: (not relocatable)
Version : 1.8.5 Vendor: CentOS
Release : 24.el5 Build Date: Wed 22 Feb 2012 04:31:29 PM CST
Install Date: Thu 26 Sep 2013 07:50:14 AM CDT Build Host: builder10.centos.org
Group : Development/Languages Source RPM: ruby-1.8.5-24.el5.src.rpm
Size : 810417 License: Ruby License/GPL – see COPYING
Signature : DSA/SHA1, Wed 22 Feb 2012 05:00:45 PM CST, Key ID a8a447dce8562897
URL : http://www.ruby-lang.org/
Summary : An interpreter of object-oriented scripting language
Description :
Ruby is the interpreted scripting language for quick and easy
object-oriented programming. It has many features to process text
files and to do system management tasks (as in Perl). It is simple,
straight-forward, and extensible.
Solution:-
=-=-=-=
Download the Ruby 1.8.7 patchlevel and re-compile
https://www.ruby-forum.com/topic/1114190
#/usr/src/ruby-1.8.7-p334/ext/openssl
ruby extconf.rb
make
make install
root@ [~]# puppet -V
2.6.12
It’s works for me. Cheers!
—————–>