食谱上缺少 Berksfile,这就是为什么我想创建一个新的,我只想在现有食谱上生成一个 Berksfile。所以当我尝试运行命令时:
berks cookbook name_of_my_cookbook
我收到以下
/opt/chef/embedded/lib/ruby/site_ruby/2.3.0/rubygems.rb:271:
in find_spec_for_exe: can't find gem berkshelf (>= 0.a) (Gem::GemNotFoundException)
from /opt/chef/embedded/lib/ruby/site_ruby/2.3.0/rubygems.rb:299:in activate_bin_path
from /usr/local/bin/berks:23:in
错误
我尝试通过再次安装berkshelf,gem install berkshelf
但收到另一条错误消息:
ERROR: Error installing berkshelf:
There are no versions of solve (~> 4.0) compatible with your Ruby & RubyGems. Maybe try installing an older version of the gem you're looking for?
solve requires Ruby version >= 2.1.0. The current ruby version is .
我没有其他想法来解决这个问题。我是这方面的新手,所以我很感激任何帮助。