berkshelf / ridley

A reliable Chef API client with a clean syntax
Other
231 stars 85 forks source link

Ridley 4.4.2 doesn't work with Chef < 12.5 #336

Closed bbrownz closed 7 years ago

bbrownz commented 8 years ago

I started running into an issue with the 4.4.2 version of ridley that resulted in the following error

/var/lib/spork/.rvm/gems/ruby-2.1.2@pop_health_main/gems/ridley-4.4.2/lib/ridley/chef/config.rb:2:in `require': cannot load such file -- chef-config/workstation_config_loader (LoadError)
    from /var/lib/spork/.rvm/gems/ruby-2.1.2@pop_health_main/gems/ridley-4.4.2/lib/ridley/chef/config.rb:2:in `<top (required)>'
    from /var/lib/spork/.rvm/gems/ruby-2.1.2@pop_health_main/gems/ridley-4.4.2/lib/ridley/chef.rb:6:in `require_relative'
    from /var/lib/spork/.rvm/gems/ruby-2.1.2@pop_health_main/gems/ridley-4.4.2/lib/ridley/chef.rb:6:in `<module:Chef>'
    from /var/lib/spork/.rvm/gems/ruby-2.1.2@pop_health_main/gems/ridley-4.4.2/lib/ridley/chef.rb:4:in `<module:Ridley>'
    from /var/lib/spork/.rvm/gems/ruby-2.1.2@pop_health_main/gems/ridley-4.4.2/lib/ridley/chef.rb:1:in `<top (required)>'
    from /var/lib/spork/.rvm/gems/ruby-2.1.2@pop_health_main/gems/ridley-4.4.2/lib/ridley.rb:69:in `require_relative'
    from /var/lib/spork/.rvm/gems/ruby-2.1.2@pop_health_main/gems/ridley-4.4.2/lib/ridley.rb:69:in `<module:Ridley>'
    from /var/lib/spork/.rvm/gems/ruby-2.1.2@pop_health_main/gems/ridley-4.4.2/lib/ridley.rb:15:in `<top (required)>'
    from /var/lib/spork/.rvm/gems/ruby-2.1.2@pop_health_main/gems/berkshelf-4.0.1/lib/berkshelf.rb:7:in `require'
    from /var/lib/spork/.rvm/gems/ruby-2.1.2@pop_health_main/gems/berkshelf-4.0.1/lib/berkshelf.rb:7:in `<top (required)>'
    from /var/lib/spork/.rvm/gems/ruby-2.1.2@pop_health_main/gems/berkshelf-4.0.1/lib/berkshelf/cli.rb:1:in `require'
    from /var/lib/spork/.rvm/gems/ruby-2.1.2@pop_health_main/gems/berkshelf-4.0.1/lib/berkshelf/cli.rb:1:in `<top (required)>'
    from /var/lib/spork/.rvm/gems/ruby-2.1.2@pop_health_main/gems/berkshelf-4.0.1/bin/berks:3:in `require'
    from /var/lib/spork/.rvm/gems/ruby-2.1.2@pop_health_main/gems/berkshelf-4.0.1/bin/berks:3:in `<top (required)>'
    from /var/lib/spork/.rvm/gems/ruby-2.1.2@pop_health_main/bin/berks:23:in `load'
    from /var/lib/spork/.rvm/gems/ruby-2.1.2@pop_health_main/bin/berks:23:in `<main>'
    from /var/lib/spork/.rvm/gems/ruby-2.1.2@pop_health_main/bin/ruby_executable_hooks:15:in `eval'
    from /var/lib/spork/.rvm/gems/ruby-2.1.2@pop_health_main/bin/ruby_executable_hooks:15:in `<main>'

It looks like 4.4.2 included a change (#333) to start using chef-config again, including require 'chef-config/workstation_config_loader'. However, workstation_config_loader wasn't moved into chef-config until 12.5.0. It would be worth noting in the gemspec the minimum chef-config version required.

Chili-Man commented 8 years ago

I am running into this issue as well

dougalb commented 8 years ago

I've addressed this by doing a versioned install of ridley and berkshelf.

I specifically install ridley-4.3.2 and berkshelf-4.0.1

https://github.com/awslabs/cfncluster-cookbook/blob/develop/packer_alinux.json#L82

On Friday, January 29, 2016, Diego Rodriguez notifications@github.com wrote:

I am running into this issue as well

— Reply to this email directly or view it on GitHub https://github.com/berkshelf/ridley/issues/336#issuecomment-177057432.