-
-
Notifications
You must be signed in to change notification settings - Fork 374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
change default ruby_path to /opt/vagrant_ruby/bin/chef-solo if use vagrant #121
Comments
Seconded. A more robust solution is to determine the path to the current |
+1. My google researches actually brought me here. |
+1, faced the same issue and fix suggested in issue description worked. Could this be a default attribute if rvm::vagrant recipe is used? |
Wow. Gotta love google and Github. There's always people experiencing the same pain as me :) |
Right on, thank you everyone, #134 should resolve this. I'll cut a release of the cookbook shortly. |
Where do I put the chef.json file? On the host system? In the VM? Somewhere on the shared directory? |
@tenaciousflea The config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.vm.provision :chef_solo do |chef|
chef.add_recipe "apt"
chef.add_recipe "postgresql::client"
chef.add_recipe "rvm::vagrant"
chef.add_recipe "rvm::system"
chef.json = {
'rvm' => {
'vagrant' => {
'system_chef_solo' => '/opt/vagrant_ruby/bin/chef-solo'
}
}
}
end |
That worked. Thanks! On Thu, Nov 15, 2012 at 11:47 AM, Clemens Müller
|
Hi! |
Ok, just in case, the problem is related to using the sudo cookbook together with: http://community.opscode.com/cookbooks/sudo When running the sudo cookbook, rvm/rbenv are in trouble in the second conversion. |
@mulderp Check the diff of that pull request. That solution worked for me. |
Interesting, thanks for the notice |
@fnichol I just run into this using chef-rvm 0.9.2 in recipe: include_recipe 'rvm::user'
include_recipe 'rvm::vagrant' in attributes.rb node.override['rvm']['user_installs'] = [
{ 'user' => 'vagrant',
'default_ruby' => 'jruby-1.7.11',
'rubies' => ['jruby-1.7.11'],
'global_gems' => [
{ 'name' => 'bundler' },
{ 'name' => 'rake' }
],
'rvmrc' => { "rvm_autolibs_flag" => "disabled" }
}
] With above test-kitchen was always failing during second So apparently rvm is still messing something with PATH. |
@fnichol can we reopen this? |
Thanks, I had the same problem, the code in the link above (https://github.com/fnichol/chef-rvm/pull/241/files) works for me. |
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. |
Hi @fnichol,
I am currently trying vagrant with chef.
This is my Vagrantfile:
After I go
vagrant up
, I could not usechef-solo
anymore. After couple hours google, I found that I actually need to add this code :And it works fine now. But since vagrant is using /opt/vagrant_ruby/bin as default ruby_path, do you think it is better to use this path if I add recipe
rvm::vagrant
?BTW, Nice work for the chef-rvm, really like it :)
The text was updated successfully, but these errors were encountered: