[英]RVM installing but no Rubies with Chef-solo and Vagrant?
我正在使用Chef-solo,Berkshelf和Vagrant嘗試構建開發環境。 我還有其他食譜可以使用,但是“ chef-rvm ”食譜使我無法安裝紅寶石版本。
需要明確的是,RVM 正在安裝,但是當我在vbox中“ vagrant ssh ”並輸入“ rvm list ”時,它說沒有安裝紅寶石。 我可以輸入“ rvm install 2.1.1 ”,它可以正常工作,所以我不確定為什么Chef不安裝它。
Vagrantfile:
config.vm.provision :chef_solo do |chef|
chef.run_list = %w[
recipe[apt::default]
recipe[rvm::user_install]
recipe[rvm::vagrant]
]
end
食譜/ default.rb:
include_recipe 'apt'
include_recipe 'rvm::user_install'
屬性/ default.rb:
node.set['rvm']['user_installs'] = [
{ 'user' => 'vagrant',
'upgrade' => 'head',
'default_ruby' => '2.1.1',
'rvm_gem_options' => '',
'rubies' => ['2.1.1', '2.0.0-p481'],
'global_gems' => [
{ 'name' => 'bundler',
'version' => '1.6.2'
},
{ 'name' => 'rake' },
{ 'name' => 'rails' },
{ 'name' => 'rubygems-bundler',
'action' => 'remove'
}
]
}
]
我認為這應該是默認操作,但是我和您有同樣的問題。 我的解決方案是在json配置中包含“ install_ruby ”屬性:
node.set['rvm']['user_installs'] = [
{ 'user' => 'vagrant',
install_rubies: true,
...
}
]
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.