poise / python

THIS COOKBOOK IS DEPRECATED – Chef cookbook to install Python and related tools

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

clebio opened this issue · comments

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.

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.