knife solo init で起こるエラー uninitialized constant KnifeSolo::Pathname (NameError)

症状

 $ knife solo init chef-repo
Creating kitchen...
Creating knife.rb in kitchen...
ERROR: knife encountered an unexpected error
This may be a bug in the 'solo init' knife command or plugin
Please collect the output of this command with the `-VV` option before filing a bug report.
Exception: NameError: uninitialized constant KnifeSolo::Pathname

対処

sudo find / -name knife-solo.rb で見つかったファイルに対して、

require 'pathname'
を追加する。

詳細

 $ knife solo init chef-repo -VV
Creating kitchen...
Creating knife.rb in kitchen...
/usr/lib/ruby/gems/1.8/gems/knife-solo-0.3.0.pre3/lib/knife-solo.rb:5:in `resource': uninitialized constant KnifeSolo::Pathname (NameError)
        from /usr/lib/ruby/gems/1.8/gems/knife-solo-0.3.0.pre3/lib/chef/knife/solo_init.rb:62:in `create_config'
        from /usr/lib/ruby/gems/1.8/gems/knife-solo-0.3.0.pre3/lib/chef/knife/solo_init.rb:28:in `run'
        from /usr/lib/ruby/gems/1.8/gems/chef-11.4.0/lib/chef/knife.rb:460:in `run_with_pretty_exceptions'
        from /usr/lib/ruby/gems/1.8/gems/chef-11.4.0/lib/chef/knife.rb:173:in `run'
        from /usr/lib/ruby/gems/1.8/gems/chef-11.4.0/lib/chef/application/knife.rb:123:in `run'
        from /usr/lib/ruby/gems/1.8/gems/chef-11.4.0/bin/knife:25
        from /usr/bin/knife:19:in `load'
        from /usr/bin/knife:19

参照


https://github.com/matschaffer/knife-solo/pull/230



コメント

このブログの人気の投稿

AppSheet の Data Source に Heroku Postgres を追加したい