4

So I have a set of cookbooks/roles that are configured to work with vagrant. I am now in the process of deploying an application, and I want to run these identical cookbooks using chef-solo on my server. So I simply installed chef-solo(the same version that I am using with vagrant), and attempted to call the following command:

sudo chef-solo -c solo.rb -j roles/clusterflunk_dev.json

Unfortunately, the following error was generated:

[Fri, 27 Jul 2012 08:20:28 +0100] INFO: *** Chef 0.10.8 ***
[Fri, 27 Jul 2012 08:20:29 +0100] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[Fri, 27 Jul 2012 08:20:29 +0100] FATAL: NoMethodError: undefined method `delete' for #  <Chef::Role:0x7f6848a05638>

I'm not sure how the same version of chef would yield different results, I'm obviously making a mistake somewhere. I'm using Ubuntu Server 10.10.

JayD3e
  • 191
  • 1
  • 1
  • 5
  • Can you post your Vagrantfile and some lines of context from `/var/chef/cache/chef-stacktrace.out` which show where the error happens (line nos), and explain how you are passing the roles to the server instance of chef-solo? – Tom Jun 14 '13 at 04:14
  • you can give the `chef-solo -l debug` options to get some verbose logging (pastebin.com that, or open a ticket on opscode.com with that output) – Tom Jun 15 '13 at 07:40

1 Answers1

1

If you are unable to determine what is causing the issue, by looking at the errors, I would suggest to upgrade chef to the current release version (upgrade 10.8 to 10.24.4, or better make the jump to 11.x) using the omni-installer.

http://www.opscode.com/chef/install/

curl -L https://www.opscode.com/chef/install.sh | sudo bash

Other users have reported similar errors, see here for an example, and there are a number of closed JSON related fixed tickets since Chef 0.10.8

Tom
  • 11,176
  • 5
  • 41
  • 63