Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Oct 2, 2018. It is now read-only.

NoMethodError: undefined method `home' for Dir:Class with system Ruby v2.1.4 #130

Closed
clebio opened this issue Nov 14, 2014 · 1 comment
Closed

Comments

@clebio
Copy link

clebio commented Nov 14, 2014

I'm getting a NoMethodError when trying to use this package to install a virtual machine in Vagrant. This seems closely related to #72, except that my system ruby is 2.1.4 (that PR seems to suggest it would only occur with versions of ruby older than 1.9.3):

$ ruby --version
ruby 2.1.4p265 (2014-10-27 revision 48166) [x86_64-darwin12.0]
$ which ruby
/usr/local/bin/ruby

Or perhaps we're talking about the version of ruby on the vagrant VM? The exact error reads:

==> default: [2014-11-14T14:00:31+00:00] FATAL: NoMethodError: python_virtualenv[/home/chef/venv/nessus] (...) had an error: NoMethodError: undefined method `home' for Dir:Class

If I comment out the line:

  environment ({ 'HOME' => ::Dir.home(new_resource.owner) }) if new_resource.owner

from providers/virtualenv.rb, I don't run into the error.

@coderanger
Copy link
Member

Make sure you are using the vagrant-omnibus plugin to install Chef in to the VM, most likely you are using an outdated or incorrectly installed version of Chef within the VM.

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

No branches or pull requests

2 participants