chef - Rbenv vagrant global ruby version unchanged -
i using vagrant berkshelf plugin create ubuntu 12.04 machine ruby 2.0.0-p247 default. when machine loads, ruby -v returns ruby 1.8.7 (2012-02-08 patchlevel 358) [x86_64-linux], indicating rbenv has not installed correct version.
also, if try rbenv global 2.0.0-p247 receive error rbenv: version2.0.0-p247' not installed`
any ideas i'm doing wrong?
thanks
vagrantfile:
config.berkshelf.enabled = true config.omnibus.chef_version = :latest config.vm.provision :shell, :inline => "gem install chef --no-rdoc --no-ri --conservative" config.vm.provision :chef_solo |chef| chef.add_recipe "apt" chef.add_recipe "git" chef.add_recipe "build-essential" chef.add_recipe "ruby_build" chef.add_recipe "rbenv::vagrant" chef.add_recipe "rbenv::system" chef.json = { 'rbenv' => { 'user_installs' => [ { 'user' => 'vagrant', 'rubies' => ['2.0.0-p247'], 'global' => '2.0.0-p247', 'gems' => { '2.0.0-p247' => [ { 'name' => 'bundler' }, { 'name' => 'rake' } ] } } ] } } end berksfile:
site :opscode cookbook 'apt' cookbook 'git' cookbook 'build-essential' cookbook 'ruby_build' cookbook 'rbenv', git: 'git://github.com/fnichol/chef-rbenv.git', ref: "v0.7.2"
you're installing user rubies rbenv cookbook. in case, rbenv::system recipe doing nothing, since didn't specify system ruby install.
instead, include rbenv::user recipe:
... chef.add_recipe "ruby_build" chef.add_recipe "rbenv::vagrant" chef.add_recipe "rbenv::user" ### recipe want chef.json = { 'rbenv' => { 'user_installs' => [ { 'user' => 'vagrant', 'rubies' => ['2.0.0-p247'], ...
Comments
Post a Comment