Skip to content
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

Provisioning of new dev box fails #2

Closed
maxlazio opened this issue Oct 29, 2012 · 10 comments
Closed

Provisioning of new dev box fails #2

maxlazio opened this issue Oct 29, 2012 · 10 comments
Assignees
Labels

Comments

@maxlazio
Copy link
Collaborator

https://gist.github.com/3a8410c08c654a95c826

@ghost ghost assigned maxlazio Oct 29, 2012
@maxlazio
Copy link
Collaborator Author

Happened during working on https://github.com/dosire/gitlabhq/issues/64 .

@maxlazio
Copy link
Collaborator Author

In cookbooks/rvm/providers/global_gem.rb

[:install, :upgrade, :remove, :purge].each do |exec_action|
 action exec_action do
  # add gem entry into global.gems
  update_global_gems_file exec_action

  # install gem in all rubies in global gemsets
  installed_rubies.each do |rubie|
    gem_package_wrapper exec_action, "#{rubie}@global"
   end
 end
end

prime suspect is that rubie is nil for some reason. Check what installed_rubies is.

@maxlazio
Copy link
Collaborator Author

  def installed_rubies
    @installed_rubies ||= update_installed_rubies
  end

and

  def update_installed_rubies
    @installed_rubies = @rvm_env.list_strings
    @installed_rubies
  end

and

   @ rvm_env      = ::RVM::ChefUserEnvironment.new(new_resource.user)

@maxlazio
Copy link
Collaborator Author

Added some logging to the recipe

installed_rubies.each do |rubie|
  Chef::Log.info("Action is #{exec_action}. Rubie is #{rubie}")
  gem_package_wrapper exec_action, "#{rubie}@global"
end

and the output is:

[2012-10-29T10:47:17+00:00] INFO: Processing rvm_global_gem[bundler] action install (rvm::user line 183)
[2012-10-29T10:47:17+00:00] INFO: Processing execute[Add bundler to /home/vagrant/.rvm/gemsets/global.gems]    action run (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/global_gem.rb line 80)
[2012-10-29T10:47:19+00:00] INFO: Action is install. Rubie is nil
[2012-10-29T10:47:19+00:00] INFO: Processing rvm_gem[bundler] action install (/tmp/vagrant-chef-1/chef-solo-1/cookbooks/rvm/providers/global_gem.rb line 49)

@maxlazio
Copy link
Collaborator Author

Downgrading VB to 4.2.0 or 4.1.12 didn't help.

@maxlazio
Copy link
Collaborator Author

Looks like this error is to be blamed on rvm chef cookbook, or rather on rvm itself:

rvm/rvm#1266

@maxlazio
Copy link
Collaborator Author

@maxlazio
Copy link
Collaborator Author

Adding that line made the chef run further than where it stopped before. Still running.

@maxlazio
Copy link
Collaborator Author

Chef ran and it completed successfully.

@maxlazio
Copy link
Collaborator Author

#3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant