2

私はVagrantで開発環境を作るためにchefを使用しようとしました。を実行すると、rbenv内にrubiesバージョンをインストールする部分で立ち往生していますvagrant provision。私はクックブックをダウンロードするために使用gem librarianします。これは私の現在のVagrantfileです: https ://github.com/rhacker/vagrant-rails/blob/master/Vagrantfile

これは、CheffileとVagrantfileを格納する私のリポジトリです:https ://github.com/rhacker/vagrant-rails

4

1 に答える 1

6

site-cookbooks/rbenv/recipes/install.rbで作成

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

rbenv_ruby "1.9.3-p194"

今あなたの中Vagrantfileで、に変更します

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
于 2012-10-10T21:09:12.057 に答える