Pregunta

Estoy tratando de configurar un nodo de marionetas, pero no parece rubygems comportarse.

Si me quedo facter en la CLI a través de su propio binario (/usr/lib/ruby/gems/1.8/gems/facter-1.5.8/bin/facter), que funciona bien, pero si lo ejecuto a través de la binario instalado por rubygems (/ usr / bin / facter), que arroja:

/usr/lib/ruby/1.8/facter/uptime.rb:11: undefined method `get_uptime' for Facter::Util::Uptime:Module (NoMethodError)
        from /usr/lib/ruby/gems/1.8/gems/facter-1.5.8/lib/facter/util/loader.rb:73:in `load'
        from /usr/lib/ruby/gems/1.8/gems/facter-1.5.8/lib/facter/util/loader.rb:73:in `load_file'
        from /usr/lib/ruby/gems/1.8/gems/facter-1.5.8/lib/facter/util/loader.rb:38:in `load_all'
        from /usr/lib/ruby/gems/1.8/gems/facter-1.5.8/lib/facter/util/loader.rb:33:in `each'
        from /usr/lib/ruby/gems/1.8/gems/facter-1.5.8/lib/facter/util/loader.rb:33:in `load_all'
        from /usr/lib/ruby/gems/1.8/gems/facter-1.5.8/lib/facter/util/loader.rb:30:in `each'
        from /usr/lib/ruby/gems/1.8/gems/facter-1.5.8/lib/facter/util/loader.rb:30:in `load_all'
        from /usr/lib/ruby/gems/1.8/gems/facter-1.5.8/lib/facter/util/collection.rb:90:in `load_all'
        from /usr/lib/ruby/gems/1.8/gems/facter-1.5.8/lib/facter.rb:95:in `to_hash'
        from /usr/lib/ruby/gems/1.8/gems/facter-1.5.8/bin/facter:137
        from /usr/bin/facter:19:in `load'
        from /usr/bin/facter:19

He intentado quitar y volver a instalar rubygems, así como la reinstalación de la gema, pero nada parece funcionar.

Estoy asumiendo que algo se almacena en caché en alguna parte, porque arroja el mismo error al intentar ejecutar títere.

¿Alguna idea?

¿Fue útil?

Solución

It looks like you may have installed facter outside of rubygems before installing it with rubygems.

You'll notice the final file in the stacktrace is /usr/lib/ruby/1.8/facter/uptime.rb instead of being a file in /usr/lib/ruby/gems/1.8/gems/facter-1.5.8.

You should check if the files in /usr/lib/ruby/1.8/facter are indeed just an older version of factor and if so, you should be able to delete them or move them to a differently named directory and it will fix your problems.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top