添加配方rvm :: vagrant并运行vagrant配置后,我得到了:
/usr/local/bin/chef-solo: line 23: /opt/vagrant_ruby/bin/chef-solo: No such file
or directory
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.
此问题应该已修复: https://github.com/fnichol/chef-rvm/issues/121
即使我添加了这行:
'rvm' => {
'vagrant' => {
'system_chef_solo' => '/opt/vagrant_ruby/bin/chef-solo'
}
}
我仍然收到错误。我怎样才能从中恢复过来?
答案 0 :(得分:6)
您必须确保'/ opt / vagrant_ruby / bin / chef-solo'是chef-solo
的实际路径。就我而言,它是/usr/bin/chef-solo
。这是我修复它的Vagrantfile
的一部分:
config.vm.provision :chef_solo do |chef|
chef.json.merge! rvm: {vagrant: {system_chef_solo: '/usr/bin/chef-solo'}}
end
答案 1 :(得分:0)
这令人沮丧,因为答案非常依赖于时间。我有这个问题,今天通过添加到我的Vagrantfile修复它。我不得不再次vagrant destroy
和vagrant up
,所以希望下次我vagrant provision
时不会中断,但我已经在框中查看了,看起来像是通往大厨独奏的路径正确。在here
chef.json = {
rvm: {
vagrant: {
system_chef_solo: '/opt/chef/bin/chef-solo'
},
user_installs: [
{
user: 'vagrant',
default_ruby: '2.2.1',
rubies: ['2.2.1'],
global: '2.2.1'
}
]
},
... rest of Vagrantfile