sous-chefs / ruby_rbenv

Development repository for the ruby_rbenv cookbook
https://supermarket.chef.io/cookbooks/ruby_rbenv
Apache License 2.0
331 stars 251 forks source link

How do I specify the ruby version I can install ? #17

Closed ghost closed 9 years ago

ghost commented 12 years ago

I'm new to Chef and I don't understand the way they use LWRP, this is my 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"
    chef.add_recipe "apt"
    chef.add_recipe "build-essential"
    chef.add_recipe "git"
    chef.add_recipe "openssl"
    chef.add_recipe "postgresql"
    chef.add_recipe "ruby_build"
    chef.add_recipe "rbenv"
    chef.add_recipe "unicorn"
  end
end
mlafeldt commented 11 years ago

You only need the LWRP to use rbenv inside other cookbooks.

You can also specify the initial rbenv configuration inside the Vagrantfile via chef.json.

For example:

    chef.json = {
      "rbenv" => {
        "rubies" => ["1.8.7-p370", "1.9.3-p194"],
        "global" => "1.9.3-p194",
        "gems" => {
          "1.9.3-p194" => [{"name" => "bundler"}]
        }
      }
    }
lock[bot] commented 6 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.