2012-10-10 121 views

回答

6

include_recipe "rbenv::default" 
include_recipe "rbenv::ruby_build" 

rbenv_ruby "1.9.3-p194" 

现在,在您Vagrantfile,改变创建site-cookbooks/rbenv/recipes/install.rb

Vagrant::Config.run do |config| 
    config.vm.box = "lucid32" 
    config.vm.network :hostonly, "33.33.33.33" 
    config.vm.customize do |vm| 
    vm.memory_size = 386 
    end 
    config.vm.provision :chef_solo do |chef| 
    chef.cookbooks_path = ["cookbooks", "site-cookbooks"] 
    chef.add_recipe "apt" 
    chef.add_recipe "build-essential" 
    chef.add_recipe "git" 
    chef.add_recipe "openssl" 
    chef.add_recipe "postgresql" 
    chef.add_recipe "rbenv::install" 
    chef.add_recipe "unicorn" 
    end 
end