r8 / vagrant-lamp

My default LAMP development stack for Vagrant
http://r8.github.io/vagrant-lamp/
753 stars 255 forks source link

can´t provision correctly (undefined method `[]' for nil:NilClass) #110

Closed mohamed-ea closed 9 years ago

mohamed-ea commented 9 years ago

after adding some missing names to drush, npm and vagrant_main cookbooks, now i got this error

==> default: ================================================================================
==> default: Recipe Compile Error in /tmp/vagrant-chef-3/chef-solo-1/cookbooks/vagrant_main/recipes/default.rb
==> default: ================================================================================
==> default: 
==> default: 
==> default: NoMethodError
==> default: -------------
==> default: undefined method `[]' for nil:NilClass
==> default: 
==> default: 
==> default: Cookbook Trace:
==> default: ---------------
==> default:   /tmp/vagrant-chef-3/chef-solo-1/cookbooks/build-essential/recipes/debian.rb:30:in `from_file'
==> default: 
==> default:   /tmp/vagrant-chef-3/chef-solo-1/cookbooks/build-essential/recipes/default.rb:21:in `from_file'
==> default: 
==> default:   /tmp/vagrant-chef-3/chef-solo-1/cookbooks/vagrant_main/recipes/default.rb:2:in `from_file'
==> default: 
==> default: 
==> default: Relevant File Content:
==> default: ----------------------
==> default: /tmp/vagrant-chef-3/chef-solo-1/cookbooks/build-essential/recipes/debian.rb:
==> default: 
==> default:  23:    command "apt-get update"
==> default:  24:    action :nothing
==> default:  25:    # tip: to suppress this running every time, just use the apt cookbook
==> default:  26:    not_if do
==> default:  27:      ::File.exists?('/var/lib/apt/periodic/update-success-stamp') &&
==> default:  28:      ::File.mtime('/var/lib/apt/periodic/update-success-stamp') > Time.now - 86400*2
==> default:  29:    end
==> default:  30>> end.run_action(:run) if node['build_essential']['compiletime']
==> default:  31:  
==> default:  32:  %w{
==> default:  33:    autoconf
==> default:  34:    binutils-doc
==> default:  35:    bison
==> default:  36:    build-essential
==> default:  37:    flex
==> default:  38:  }.each do |pkg|
==> default:  39:  
==> default: 
==> default: [2015-01-12T20:07:11+00:00] ERROR: Running exception handlers
==> default: [2015-01-12T20:07:11+00:00] ERROR: Exception handlers complete
==> default: [2015-01-12T20:07:11+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
==> default: [2015-01-12T20:07:11+00:00] ERROR: undefined method `[]' for nil:NilClass
==> default: [2015-01-12T20:07:11+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.

vagrant version : 1.7.1 OS X 10.10.1 VirtualBox 4.3

ssheduardo commented 9 years ago

I have same problem. OS X Yosemite VirtualBox 4.3 Vagrant 1.7.1 Please one solution.

a5e commented 9 years ago

Any update on this error ? I got exactly the same but prior to this I got this:

==> default: [2015-01-28T11:22:07+00:00] INFO: Start handlers complete.
==> default: [2015-01-28T11:22:08+00:00] WARN: MissingCookbookDependency:
==> default: Recipe `apt` is not in the run_list, and cookbook 'apt'
==> default: is not a dependency of any cookbook in the run_list.  To load this recipe,
==> default: first add a dependency on cookbook 'apt' in the cookbook you're
==> default: including it from in that cookbook's metadata.
==> default: [2015-01-28T11:22:08+00:00] WARN: MissingCookbookDependency:
==> default: Recipe `build-essential` is not in the run_list, and cookbook 'build-essential'
==> default: is not a dependency of any cookbook in the run_list.  To load this recipe,
==> default: first add a dependency on cookbook 'build-essential' in the cookbook you're
==> default: including it from in that cookbook's metadata.
==> default: [2015-01-28T11:22:08+00:00] WARN: MissingCookbookDependency:
==> default: Recipe `build-essential::debian` is not in the run_list, and cookbook 'build-essential'
==> default: is not a dependency of any cookbook in the run_list.  To load this recipe,
==> default: first add a dependency on cookbook 'build-essential' in the cookbook you're
==> default: including it from in that cookbook's metadata.

Any idea how to fix this ?

ssheduardo commented 9 years ago

I temporarily use another virtual machine.

Eduardo D. | Web Developer

http://es.linkedin.com/in/eduardodx/ https://twitter.com/eduardo_dx https://github.com/ssheduardo/

2015-01-28 12:23 GMT+01:00 Antoine notifications@github.com:

Any update on this error ? I got exactly the same but prior to this I got this:

[2015-01-28T11:22:07+00:00] INFO: Start handlers complete. ==> default: [2015-01-28T11:22:08+00:00] WARN: MissingCookbookDependency: ==> default: Recipe apt is not in the run_list, and cookbook 'apt' ==> default: is not a dependency of any cookbook in the run_list. To load this recipe, ==> default: first add a dependency on cookbook 'apt' in the cookbook you're ==> default: including it from in that cookbook's metadata. ==> default: [2015-01-28T11:22:08+00:00] WARN: MissingCookbookDependency: ==> default: Recipe build-essential is not in the run_list, and cookbook 'build-essential' ==> default: is not a dependency of any cookbook in the run_list. To load this recipe, ==> default: first add a dependency on cookbook 'build-essential' in the cookbook you're ==> default: including it from in that cookbook's metadata. ==> default: [2015-01-28T11:22:08+00:00] WARN: MissingCookbookDependency: ==> default: Recipe build-essential::debian is not in the run_list, and cookbook 'build-essential' ==> default: is not a dependency of any cookbook in the run_list. To load this recipe, ==> default: first add a dependency on cookbook 'build-essential' in the cookbook you're ==> default: including it from in that cookbook's metadata.

Any idea how to fix this ?

— Reply to this email directly or view it on GitHub https://github.com/r8/vagrant-lamp/issues/110#issuecomment-71818528.

ghost commented 9 years ago

Same Problem:

jakraska commented 9 years ago

Same issue here