# application\_ruby

**URL:** <https://discourse.chef.io/t/application-ruby/4849>\
**Category:** Chef Infra (archive)\
**Created:** [December 4, 2013, 10:48pm UTC](https://discourse.chef.io/t/application-ruby/4849 "2013-12-04T22:48:43Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rob\_Watkin](https://avatars.discourse-cdn.com/v4/letter/r/f17d59/32.png) [@Rob\_Watkin](https://discourse.chef.io/u/Rob_Watkin)\
**Post date:** [December 4, 2013, 10:48pm UTC](https://discourse.chef.io/t/application-ruby/4849/1 "2013-12-04T22:48:43Z")

</div>

I’m getting the following error with application\_ruby. It’s probably  
something I’ve missed. I’m running it locally with vagrant and berkshelf,  
both files below. Any help would be appreciated.

Thanks  
Rob

[2013-12-04T22:30:37+00:00] INFO: Start handlers complete.

# ================================================================================ Recipe Compile Error in /tmp/vagrant-chef-1/chef-solo-1/cookbooks/application/resources/default.rb

## NameError

uninitialized constant Chef::DSL

## Cookbook Trace:

/tmp/vagrant-chef-1/chef-solo-1/cookbooks/application/resources/default.rb:23:in  
`class\_from\_file’

## Relevant File Content:

/tmp/vagrant-chef-1/chef-solo-1/cookbooks/application/resources/default.rb:

1: #  
2: # Author:: Noah Kantrowitz [noah@opscode.com](mailto:noah@opscode.com)  
3: # Cookbook Name:: application

# Vagrantfile

Vagrant.configure(“2”) do |config|  
config.vm.box = "Berkshelf-CentOS-6.3"  
config.berkshelf.enabled = true  
config.vm.box\_url = "  
[https://dl.dropbox.com/u/31081437/Berkshelf-CentOS-6.3-x86\_64-minimal.box](https://dl.dropbox.com/u/31081437/Berkshelf-CentOS-6.3-x86_64-minimal.box)"  
config.vm.hostname = "devirsatel"  
config.vm.network :forwarded\_port, guest: 8080, host: 9080  
config.vm.network :forwarded\_port, guest: 15672, host: 15672  
config.vm.provision :chef\_solo do |chef|  
chef.cookbooks\_path = "cookbooks"  
chef.add\_recipe "application\_ruby"  
chef.data\_bags\_path = "data\_bags"  
end  
end

# Berksfile

site :opscode  
cookbook “application\_ruby”

---

<div class="post-metadata">

**Author:** ![coderanger](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/coderanger/32/5_2.png) [@coderanger](https://discourse.chef.io/u/coderanger)\
**Post date:** [December 4, 2013, 10:50pm UTC](https://discourse.chef.io/t/application-ruby/4849/2 "2013-12-04T22:50:17Z")

</div>

What version of Chef are you using?

--Noah

On Dec 4, 2013, at 2:48 PM, Rob Watkin [robwatkin@gmail.com](mailto:robwatkin@gmail.com) wrote:

> I'm getting the following error with application\_ruby. It's probably something I've missed. I'm running it locally with vagrant and berkshelf, both files below. Any help would be appreciated.
> 
> Thanks  
> Rob
> 
> [2013-12-04T22:30:37+00:00] INFO: Start handlers complete.
> 
> # ================================================================================ Recipe Compile Error in /tmp/vagrant-chef-1/chef-solo-1/cookbooks/application/resources/default.rb
> 
> ## NameError
> 
> uninitialized constant Chef::DSL
> 
> ## Cookbook Trace:
> 
> /tmp/vagrant-chef-1/chef-solo-1/cookbooks/application/resources/default.rb:23:in `class\_from\_file'
> 
> ## Relevant File Content:
> 
> /tmp/vagrant-chef-1/chef-solo-1/cookbooks/application/resources/default.rb:
> 
> 1: #  
> 2: # Author:: Noah Kantrowitz [noah@opscode.com](mailto:noah@opscode.com)  
> 3: # Cookbook Name:: application
> 
> # Vagrantfile
> 
> Vagrant.configure("2") do |config|  
> config.vm.box = "Berkshelf-CentOS-6.3"  
> config.berkshelf.enabled = true  
> config.vm.box\_url = "[https://dl.dropbox.com/u/31081437/Berkshelf-CentOS-6.3-x86\_64-minimal.box](https://dl.dropbox.com/u/31081437/Berkshelf-CentOS-6.3-x86_64-minimal.box)"  
> config.vm.hostname = "devirsatel"  
> config.vm.network :forwarded\_port, guest: 8080, host: 9080  
> config.vm.network :forwarded\_port, guest: 15672, host: 15672  
> config.vm.provision :chef\_solo do |chef|  
> chef.cookbooks\_path = "cookbooks"  
> chef.add\_recipe "application\_ruby"  
> chef.data\_bags\_path = "data\_bags"  
> end  
> end
> 
> # Berksfile
> 
> site :opscode  
> cookbook "application\_ruby"

---

<div class="post-metadata">

**Author:** ![Stephen\_Lauck](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/stephen_lauck/32/379_2.png) [@Stephen\_Lauck](https://discourse.chef.io/u/Stephen_Lauck)\
**Post date:** [December 4, 2013, 10:59pm UTC](https://discourse.chef.io/t/application-ruby/4849/3 "2013-12-04T22:59:44Z")

</div>

Is this related to the deprecation warnings?

I have a pull request in if we want to assume Chef 11.

> <https://github.com/poise/application_ruby/pull/43>
>
> Fix for WARN: Chef::Mixin::LanguageIncludeRecipe is deprecated, use Chef::DSL::I…ncludeRecipe
> instead.

On Wed, Dec 4, 2013 at 2:50 PM, Noah Kantrowitz [noah@coderanger.net](mailto:noah@coderanger.net) wrote:

> What version of Chef are you using?
> 
> --Noah
> 
> On Dec 4, 2013, at 2:48 PM, Rob Watkin [robwatkin@gmail.com](mailto:robwatkin@gmail.com) wrote:
> 
> > I'm getting the following error with application\_ruby. It's probably  
> > something I've missed. I'm running it locally with vagrant and berkshelf,  
> > both files below. Any help would be appreciated.
> > 
> > Thanks  
> > Rob
> > 
> > [2013-12-04T22:30:37+00:00] INFO: Start handlers complete.
> 
> ================================================================================
> 
> > Recipe Compile Error in  
> > /tmp/vagrant-chef-1/chef-solo-1/cookbooks/application/resources/default.rb
> 
> ================================================================================
> 
> > ## NameError
> > 
> > uninitialized constant Chef::DSL
> > 
> > ## Cookbook Trace:
> 
> /tmp/vagrant-chef-1/chef-solo-1/cookbooks/application/resources/default.rb:23:in  
> `class\_from\_file'
> 
> > ## Relevant File Content:
> 
> /tmp/vagrant-chef-1/chef-solo-1/cookbooks/application/resources/default.rb:
> 
> > 1: #  
> > 2: # Author:: Noah Kantrowitz [noah@opscode.com](mailto:noah@opscode.com)  
> > 3: # Cookbook Name:: application
> > 
> > # Vagrantfile
> > 
> > Vagrant.configure("2") do |config|  
> > config.vm.box = "Berkshelf-CentOS-6.3"  
> > config.berkshelf.enabled = true  
> > config.vm.box\_url = "  
> > [https://dl.dropbox.com/u/31081437/Berkshelf-CentOS-6.3-x86\_64-minimal.box](https://dl.dropbox.com/u/31081437/Berkshelf-CentOS-6.3-x86_64-minimal.box)"  
> > config.vm.hostname = "devirsatel"  
> > config.vm.network :forwarded\_port, guest: 8080, host: 9080  
> > config.vm.network :forwarded\_port, guest: 15672, host: 15672  
> > config.vm.provision :chef\_solo do |chef|  
> > chef.cookbooks\_path = "cookbooks"  
> > chef.add\_recipe "application\_ruby"  
> > chef.data\_bags\_path = "data\_bags"  
> > end  
> > end
> > 
> > # Berksfile
> > 
> > site :opscode  
> > cookbook "application\_ruby"

---

<div class="post-metadata">

**Author:** ![Rob\_Watkin](https://avatars.discourse-cdn.com/v4/letter/r/f17d59/32.png) [@Rob\_Watkin](https://discourse.chef.io/u/Rob_Watkin)\
**Post date:** [December 4, 2013, 11:34pm UTC](https://discourse.chef.io/t/application-ruby/4849/4 "2013-12-04T23:34:36Z")

</div>

Good question.

I'm now to Chef so I'm using pretty much the latest of everything. I was a  
bit worried that the vm image was a little old so I tried

config.vm.provision :shell, :inline =\> "curl -L  
[https://www.opscode.com/chef/install.sh](https://www.opscode.com/chef/install.sh) | sudo bash"

which didn't help

On 4 December 2013 22:50, Noah Kantrowitz [noah@coderanger.net](mailto:noah@coderanger.net) wrote:

> What version of Chef are you using?
> 
> --Noah
> 
> On Dec 4, 2013, at 2:48 PM, Rob Watkin [robwatkin@gmail.com](mailto:robwatkin@gmail.com) wrote:
> 
> > I'm getting the following error with application\_ruby. It's probably  
> > something I've missed. I'm running it locally with vagrant and berkshelf,  
> > both files below. Any help would be appreciated.
> > 
> > Thanks  
> > Rob
> > 
> > [2013-12-04T22:30:37+00:00] INFO: Start handlers complete.
> 
> ================================================================================
> 
> > Recipe Compile Error in  
> > /tmp/vagrant-chef-1/chef-solo-1/cookbooks/application/resources/default.rb
> 
> ================================================================================
> 
> > ## NameError
> > 
> > uninitialized constant Chef::DSL
> > 
> > ## Cookbook Trace:
> 
> /tmp/vagrant-chef-1/chef-solo-1/cookbooks/application/resources/default.rb:23:in  
> `class\_from\_file'
> 
> > ## Relevant File Content:
> 
> /tmp/vagrant-chef-1/chef-solo-1/cookbooks/application/resources/default.rb:
> 
> > 1: #  
> > 2: # Author:: Noah Kantrowitz [noah@opscode.com](mailto:noah@opscode.com)  
> > 3: # Cookbook Name:: application
> > 
> > # Vagrantfile
> > 
> > Vagrant.configure("2") do |config|  
> > config.vm.box = "Berkshelf-CentOS-6.3"  
> > config.berkshelf.enabled = true  
> > config.vm.box\_url = "  
> > [https://dl.dropbox.com/u/31081437/Berkshelf-CentOS-6.3-x86\_64-minimal.box](https://dl.dropbox.com/u/31081437/Berkshelf-CentOS-6.3-x86_64-minimal.box)"  
> > config.vm.hostname = "devirsatel"  
> > config.vm.network :forwarded\_port, guest: 8080, host: 9080  
> > config.vm.network :forwarded\_port, guest: 15672, host: 15672  
> > config.vm.provision :chef\_solo do |chef|  
> > chef.cookbooks\_path = "cookbooks"  
> > chef.add\_recipe "application\_ruby"  
> > chef.data\_bags\_path = "data\_bags"  
> > end  
> > end
> > 
> > # Berksfile
> > 
> > site :opscode  
> > cookbook "application\_ruby"

---

<div class="post-metadata">

**Author:** ![Rob\_Watkin](https://avatars.discourse-cdn.com/v4/letter/r/f17d59/32.png) [@Rob\_Watkin](https://discourse.chef.io/u/Rob_Watkin)\
**Post date:** [December 4, 2013, 11:35pm UTC](https://discourse.chef.io/t/application-ruby/4849/5 "2013-12-04T23:35:45Z")

</div>

Correction:  
I'm _new_ to Chef so I'm using pretty much the latest of everything

On 4 December 2013 23:34, Rob Watkin [robwatkin@gmail.com](mailto:robwatkin@gmail.com) wrote:

> Good question.
> 
> I'm now to Chef so I'm using pretty much the latest of everything. I was a  
> bit worried that the vm image was a little old so I tried
> 
> config.vm.provision :shell, :inline =\> "curl -L  
> [https://www.opscode.com/chef/install.sh](https://www.opscode.com/chef/install.sh) | sudo bash"
> 
> which didn't help
> 
> On 4 December 2013 22:50, Noah Kantrowitz [noah@coderanger.net](mailto:noah@coderanger.net) wrote:
> 
> > What version of Chef are you using?
> > 
> > --Noah
> > 
> > On Dec 4, 2013, at 2:48 PM, Rob Watkin [robwatkin@gmail.com](mailto:robwatkin@gmail.com) wrote:
> > 
> > > I'm getting the following error with application\_ruby. It's probably  
> > > something I've missed. I'm running it locally with vagrant and berkshelf,  
> > > both files below. Any help would be appreciated.
> > > 
> > > Thanks  
> > > Rob
> > > 
> > > [2013-12-04T22:30:37+00:00] INFO: Start handlers complete.
> > 
> > ================================================================================
> > 
> > > Recipe Compile Error in  
> > > /tmp/vagrant-chef-1/chef-solo-1/cookbooks/application/resources/default.rb
> > 
> > ================================================================================
> > 
> > > ## NameError
> > > 
> > > uninitialized constant Chef::DSL
> > > 
> > > ## Cookbook Trace:
> > 
> > /tmp/vagrant-chef-1/chef-solo-1/cookbooks/application/resources/default.rb:23:in  
> > `class\_from\_file'
> > 
> > > ## Relevant File Content:
> > 
> > /tmp/vagrant-chef-1/chef-solo-1/cookbooks/application/resources/default.rb:
> > 
> > > 1: #  
> > > 2: # Author:: Noah Kantrowitz [noah@opscode.com](mailto:noah@opscode.com)  
> > > 3: # Cookbook Name:: application
> > > 
> > > # Vagrantfile
> > > 
> > > Vagrant.configure("2") do |config|  
> > > config.vm.box = "Berkshelf-CentOS-6.3"  
> > > config.berkshelf.enabled = true  
> > > config.vm.box\_url = "  
> > > [https://dl.dropbox.com/u/31081437/Berkshelf-CentOS-6.3-x86\_64-minimal.box](https://dl.dropbox.com/u/31081437/Berkshelf-CentOS-6.3-x86_64-minimal.box)  
> > > "  
> > > config.vm.hostname = "devirsatel"  
> > > config.vm.network :forwarded\_port, guest: 8080, host: 9080  
> > > config.vm.network :forwarded\_port, guest: 15672, host: 15672  
> > > config.vm.provision :chef\_solo do |chef|  
> > > chef.cookbooks\_path = "cookbooks"  
> > > chef.add\_recipe "application\_ruby"  
> > > chef.data\_bags\_path = "data\_bags"  
> > > end  
> > > end
> > > 
> > > # Berksfile
> > > 
> > > site :opscode  
> > > cookbook "application\_ruby"

---

<div class="post-metadata">

**Author:** ![Lamont\_Granquist\_OLD](https://avatars.discourse-cdn.com/v4/letter/l/7feea3/32.png) [@Lamont\_Granquist\_OLD](https://discourse.chef.io/u/Lamont_Granquist_OLD)\
**Post date:** [December 5, 2013, 3:49am UTC](https://discourse.chef.io/t/application-ruby/4849/6 "2013-12-05T03:49:28Z")

</div>

A related change already went into the application cookbook so the  
latest major versions of both application and application\_ruby no longer  
support 10.x

On 12/4/13 2:59 PM, Stephen Lauck wrote:

> Is this related to the deprecation warnings?
> 
> I have a pull request in if we want to assume Chef 11.
> 
> [fix deprecation warnings for Chef::DS?L::IncludeRecipe by stephenlauck · Pull Request #43 · poise/application\_ruby · GitHub](https://github.com/poise/application_ruby/pull/43)
> 
> On Wed, Dec 4, 2013 at 2:50 PM, Noah Kantrowitz \<[noah@coderanger.net](mailto:noah@coderanger.net)  
> [mailto:noah@coderanger.net](mailto:noah@coderanger.net)\> wrote:
> 
> ```
> What version of Chef are you using?
> 
> --Noah
> 
> On Dec 4, 2013, at 2:48 PM, Rob Watkin <robwatkin@gmail.com
> <mailto:robwatkin@gmail.com>> wrote:
> 
> > I'm getting the following error with application_ruby. It's
> probably something I've missed. I'm running it locally with
> vagrant and berkshelf, both files below. Any help would be
> appreciated.
> >
> > Thanks
> > Rob
> >
> > [2013-12-04T22:30:37+00:00] INFO: Start handlers complete.
> >
> >
> ================================================================================
> > Recipe Compile Error in
> /tmp/vagrant-chef-1/chef-solo-1/cookbooks/application/resources/default.rb
> >
> ================================================================================
> >
> > NameError
> > ---------
> > uninitialized constant Chef::DSL
> >
> > Cookbook Trace:
> > ---------------
> >
> /tmp/vagrant-chef-1/chef-solo-1/cookbooks/application/resources/default.rb:23:in
> `class_from_file'
> >
> > Relevant File Content:
> > ----------------------
> >
> /tmp/vagrant-chef-1/chef-solo-1/cookbooks/application/resources/default.rb:
> >
> > 1: #
> > 2: # Author:: Noah Kantrowitz <noah@opscode.com
> <mailto:noah@opscode.com>>
> > 3: # Cookbook Name:: application
> >
> >
> > Vagrantfile
> > ========
> >
> > Vagrant.configure("2") do |config|
> > config.vm.box = "Berkshelf-CentOS-6.3"
> > config.berkshelf.enabled = true
> > config.vm.box_url =
> "https://dl.dropbox.com/u/31081437/Berkshelf-CentOS-6.3-x86_64-minimal.box"
> > config.vm.hostname = "devirsatel"
> > config.vm.network :forwarded_port, guest: 8080, host: 9080
> > config.vm.network :forwarded_port, guest: 15672, host: 15672
> > config.vm.provision :chef_solo do |chef|
> > chef.cookbooks_path = "cookbooks"
> > chef.add_recipe "application_ruby"
> > chef.data_bags_path = "data_bags"
> > end
> > end
> >
> > Berksfile
> > =======
> >
> > site :opscode
> > cookbook "application_ruby"
> >
> 
> ```

---

<div class="post-metadata">

**Author:** ![Rob\_Watkin](https://avatars.discourse-cdn.com/v4/letter/r/f17d59/32.png) [@Rob\_Watkin](https://discourse.chef.io/u/Rob_Watkin)\
**Post date:** [December 5, 2013, 9:12am UTC](https://discourse.chef.io/t/application-ruby/4849/7 "2013-12-05T09:12:15Z")

</div>

Hence I've been experimenting with  
config.vm.provision :shell, :inline =\> "curl -L  
[https://www.opscode.com/chef/install.sh](https://www.opscode.com/chef/install.sh) | sudo bash"

So following your advice I'll keep that in there:

chef-repo$ vagrant ssh  
[vagrant@devirsatel ~]$ chef-solo --version  
Chef: 11.8.2  
[vagrant@devirsatel ~]$ chef-client --version  
Chef: 11.8.2

Now I get the error:

[2013-12-05T09:10:12+00:00] ERROR: could not find recipe default for  
cookbook application\_ruby

full listing below:

chef-repo$ vagrant up  
Bringing machine 'default' up with 'virtualbox' provider...  
[default] Importing base box 'Berkshelf-CentOS-6.3'...  
[default] Matching MAC address for NAT networking...  
[default] Setting the name of the VM...  
[default] Clearing any previously set forwarded ports...  
[Berkshelf] This version of the Berkshelf plugin has not been fully tested  
on this version of Vagrant.  
[Berkshelf] You should check for a newer version of vagrant-berkshelf.  
[Berkshelf] If you encounter any errors with this version, please report  
them at [GitHub · Where software is built](https://github.com/RiotGames/vagrant-berkshelf/issues)  
[Berkshelf] You can also join the discussion in #berkshelf on Freenode.  
[Berkshelf] Updating Vagrant's berkshelf:  
'/Users/rob/.berkshelf/default/vagrant/berkshelf-20131205-66017-jq94th-default'  
[Berkshelf] Using application\_ruby (3.0.2)  
[Berkshelf] Using unicorn (1.3.0)  
[Berkshelf] Using apache2 (1.8.4)  
[Berkshelf] Using passenger\_apache2 (2.1.2)  
[Berkshelf] Using build-essential (1.4.2)  
[Berkshelf] Using application (4.1.4)  
[Berkshelf] Using runit (1.4.0)  
[Berkshelf] Using yum (2.4.2)  
[Berkshelf] Using logrotate (1.4.0)  
[default] Creating shared folders metadata...  
[default] Clearing any previously set network interfaces...  
[default] Preparing network interfaces based on configuration...  
[default] Forwarding ports...  
[default] -- 22 =\> 2222 (adapter 1)  
[default] -- 8080 =\> 9080 (adapter 1)  
[default] -- 15672 =\> 15672 (adapter 1)  
[default] Booting VM...  
[default] Waiting for machine to boot. This may take a few minutes...  
[default] Machine booted and ready!  
[default] Setting hostname...  
[default] Mounting shared folders...  
[default] -- /vagrant  
[default] -- /tmp/vagrant-chef-1/chef-solo-1/cookbooks  
[default] -- /tmp/vagrant-chef-1/chef-solo-2/data\_bags  
[default] Running provisioner: shell...  
[default] Running: inline script  
% Total % Received % Xferd Average Speed Time Time Time  
Current  
Dload Upload Total Spent Left  
Speed  
101 6790 101 6790 0 0 1173 0 0:00:05 0:00:05 --:--:--  
25719  
Downloading Chef for el...  
Installing Chef  
warning: /tmp/tmp.TSFbNOSM/chef-.x86\_64.rpm: Header V4 DSA/SHA1 Signature,  
key ID 83ef826a: NOKEY  
Preparing...  
##################################################  
chef  
##################################################  
Thank you for installing Chef!  
[default] Running provisioner: chef\_solo...  
Generating chef JSON and uploading...  
Running chef-solo...  
[2013-12-05T09:10:11+00:00] INFO: Forking chef instance to converge...  
[2013-12-05T09:10:11+00:00] INFO: \*\*\* Chef 11.8.2 \*\*\*  
[2013-12-05T09:10:11+00:00] INFO: Chef-client pid: 2663  
[2013-12-05T09:10:11+00:00] INFO: Setting the run\_list to  
["recipe[application\_ruby]"] from JSON  
[2013-12-05T09:10:11+00:00] INFO: Run List is [recipe[application\_ruby]]  
[2013-12-05T09:10:11+00:00] INFO: Run List expands to [application\_ruby]  
[2013-12-05T09:10:11+00:00] INFO: Starting Chef Run for devirsatel  
[2013-12-05T09:10:11+00:00] INFO: Running start handlers  
[2013-12-05T09:10:11+00:00] INFO: Start handlers complete.  
[2013-12-05T09:10:12+00:00] WARN: Chef::Mixin::LanguageIncludeRecipe is  
deprecated, use Chef::DSL::IncludeRecipe  
instead.

[2013-12-05T09:10:12+00:00] WARN: Called from:  
/tmp/vagrant-chef-1/chef-solo-1/cookbooks/application\_ruby/providers/passenger\_apache2.rb:20:in  
`class_from_file' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.2/lib/chef/mixin/from_file.rb:42:in `class\_eval'  
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.2/lib/chef/mixin/from\_file.rb:42:in  
`class\_from\_file'  
[2013-12-05T09:10:12+00:00] WARN: Chef::Mixin::LanguageIncludeRecipe is  
deprecated, use Chef::DSL::IncludeRecipe  
instead.

[2013-12-05T09:10:12+00:00] WARN: Called from:  
/tmp/vagrant-chef-1/chef-solo-1/cookbooks/application\_ruby/providers/unicorn.rb:21:in  
`class_from_file' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.2/lib/chef/mixin/from_file.rb:42:in `class\_eval'  
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.2/lib/chef/mixin/from\_file.rb:42:in  
`class\_from\_file'  
[2013-12-05T09:10:12+00:00] ERROR: Running exception handlers  
[2013-12-05T09:10:12+00:00] ERROR: Exception handlers complete  
[2013-12-05T09:10:12+00:00] FATAL: Stacktrace dumped to  
/var/chef/cache/chef-stacktrace.out  
[2013-12-05T09:10:12+00:00] ERROR: could not find recipe default for  
cookbook application\_ruby

# ================================================================================ Recipe Compile Error

## Chef::Exceptions::RecipeNotFound

could not find recipe default for cookbook application\_ruby

[2013-12-05T09:10:11+00:00] INFO: Forking chef instance to converge...  
[2013-12-05T09:10:12+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.

On 5 December 2013 03:49, Lamont Granquist [lamont@opscode.com](mailto:lamont@opscode.com) wrote:

> A related change already went into the application cookbook so the latest  
> major versions of both application and application\_ruby no longer support  
> 10.x
> 
> On 12/4/13 2:59 PM, Stephen Lauck wrote:
> 
> Is this related to the deprecation warnings?
> 
> I have a pull request in if we want to assume Chef 11.
> 
> [fix deprecation warnings for Chef::DS?L::IncludeRecipe by stephenlauck · Pull Request #43 · poise/application\_ruby · GitHub](https://github.com/poise/application_ruby/pull/43)
> 
> On Wed, Dec 4, 2013 at 2:50 PM, Noah Kantrowitz [noah@coderanger.net](mailto:noah@coderanger.net)wrote:
> 
> > What version of Chef are you using?
> > 
> > --Noah
> > 
> > On Dec 4, 2013, at 2:48 PM, Rob Watkin [robwatkin@gmail.com](mailto:robwatkin@gmail.com) wrote:
> > 
> > > I'm getting the following error with application\_ruby. It's probably  
> > > something I've missed. I'm running it locally with vagrant and berkshelf,  
> > > both files below. Any help would be appreciated.
> > > 
> > > Thanks  
> > > Rob
> > > 
> > > [2013-12-04T22:30:37+00:00] INFO: Start handlers complete.
> > 
> > ================================================================================
> > 
> > > Recipe Compile Error in  
> > > /tmp/vagrant-chef-1/chef-solo-1/cookbooks/application/resources/default.rb
> > 
> > ================================================================================
> > 
> > > ## NameError
> > > 
> > > uninitialized constant Chef::DSL
> > > 
> > > ## Cookbook Trace:
> > 
> > /tmp/vagrant-chef-1/chef-solo-1/cookbooks/application/resources/default.rb:23:in  
> > `class\_from\_file'
> > 
> > > ## Relevant File Content:
> > 
> > /tmp/vagrant-chef-1/chef-solo-1/cookbooks/application/resources/default.rb:
> > 
> > > 1: #  
> > > 2: # Author:: Noah Kantrowitz [noah@opscode.com](mailto:noah@opscode.com)  
> > > 3: # Cookbook Name:: application
> > > 
> > > # Vagrantfile
> > > 
> > > Vagrant.configure("2") do |config|  
> > > config.vm.box = "Berkshelf-CentOS-6.3"  
> > > config.berkshelf.enabled = true  
> > > config.vm.box\_url = "  
> > > [https://dl.dropbox.com/u/31081437/Berkshelf-CentOS-6.3-x86\_64-minimal.box](https://dl.dropbox.com/u/31081437/Berkshelf-CentOS-6.3-x86_64-minimal.box)  
> > > "  
> > > config.vm.hostname = "devirsatel"  
> > > config.vm.network :forwarded\_port, guest: 8080, host: 9080  
> > > config.vm.network :forwarded\_port, guest: 15672, host: 15672  
> > > config.vm.provision :chef\_solo do |chef|  
> > > chef.cookbooks\_path = "cookbooks"  
> > > chef.add\_recipe "application\_ruby"  
> > > chef.data\_bags\_path = "data\_bags"  
> > > end  
> > > end
> > > 
> > > # Berksfile
> > > 
> > > site :opscode  
> > > cookbook "application\_ruby"

---

<div class="post-metadata">

**Author:** ![Jorge\_Bianquetti](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/jorge_bianquetti/32/432_2.png) [@Jorge\_Bianquetti](https://discourse.chef.io/u/Jorge_Bianquetti)\
**Post date:** [December 5, 2013, 11:13am UTC](https://discourse.chef.io/t/application-ruby/4849/8 "2013-12-05T11:13:55Z")

</div>

> ERROR: could not find recipe default for cookbook application\_ruby

You have recipe[application\_ruby] on the run\_list, and this cookbook  
has not an default.rb recipe.  
This kind of cookbook is called "library", because you need to  
include them into other cookbooks recipes

2013/12/5 Rob Watkin [robwatkin@gmail.com](mailto:robwatkin@gmail.com):

> Hence I've been experimenting with  
> config.vm.provision :shell, :inline =\> "curl -L  
> [https://www.opscode.com/chef/install.sh](https://www.opscode.com/chef/install.sh) | sudo bash"
> 
> So following your advice I'll keep that in there:
> 
> chef-repo$ vagrant ssh  
> [vagrant@devirsatel ~]$ chef-solo --version  
> Chef: 11.8.2  
> [vagrant@devirsatel ~]$ chef-client --version  
> Chef: 11.8.2
> 
> Now I get the error:
> 
> [2013-12-05T09:10:12+00:00] ERROR: could not find recipe default for  
> cookbook application\_ruby
> 
> full listing below:
> 
> chef-repo$ vagrant up  
> Bringing machine 'default' up with 'virtualbox' provider...  
> [default] Importing base box 'Berkshelf-CentOS-6.3'...  
> [default] Matching MAC address for NAT networking...  
> [default] Setting the name of the VM...  
> [default] Clearing any previously set forwarded ports...  
> [Berkshelf] This version of the Berkshelf plugin has not been fully tested  
> on this version of Vagrant.  
> [Berkshelf] You should check for a newer version of vagrant-berkshelf.  
> [Berkshelf] If you encounter any errors with this version, please report  
> them at [Issues · berkshelf/vagrant-berkshelf · GitHub](https://github.com/RiotGames/vagrant-berkshelf/issues)  
> [Berkshelf] You can also join the discussion in #berkshelf on Freenode.  
> [Berkshelf] Updating Vagrant's berkshelf:  
> '/Users/rob/.berkshelf/default/vagrant/berkshelf-20131205-66017-jq94th-default'  
> [Berkshelf] Using application\_ruby (3.0.2)  
> [Berkshelf] Using unicorn (1.3.0)  
> [Berkshelf] Using apache2 (1.8.4)  
> [Berkshelf] Using passenger\_apache2 (2.1.2)  
> [Berkshelf] Using build-essential (1.4.2)  
> [Berkshelf] Using application (4.1.4)  
> [Berkshelf] Using runit (1.4.0)  
> [Berkshelf] Using yum (2.4.2)  
> [Berkshelf] Using logrotate (1.4.0)  
> [default] Creating shared folders metadata...  
> [default] Clearing any previously set network interfaces...  
> [default] Preparing network interfaces based on configuration...  
> [default] Forwarding ports...  
> [default] -- 22 =\> 2222 (adapter 1)  
> [default] -- 8080 =\> 9080 (adapter 1)  
> [default] -- 15672 =\> 15672 (adapter 1)  
> [default] Booting VM...  
> [default] Waiting for machine to boot. This may take a few minutes...  
> [default] Machine booted and ready!  
> [default] Setting hostname...  
> [default] Mounting shared folders...  
> [default] -- /vagrant  
> [default] -- /tmp/vagrant-chef-1/chef-solo-1/cookbooks  
> [default] -- /tmp/vagrant-chef-1/chef-solo-2/data\_bags  
> [default] Running provisioner: shell...  
> [default] Running: inline script  
> % Total % Received % Xferd Average Speed Time Time Time  
> Current  
> Dload Upload Total Spent Left  
> Speed  
> 101 6790 101 6790 0 0 1173 0 0:00:05 0:00:05 --:--:--  
> 25719  
> Downloading Chef for el...  
> Installing Chef  
> warning: /tmp/tmp.TSFbNOSM/chef-.x86\_64.rpm: Header V4 DSA/SHA1 Signature,  
> key ID 83ef826a: NOKEY  
> Preparing...  
> ##################################################  
> chef  
> ##################################################  
> Thank you for installing Chef!  
> [default] Running provisioner: chef\_solo...  
> Generating chef JSON and uploading...  
> Running chef-solo...  
> [2013-12-05T09:10:11+00:00] INFO: Forking chef instance to converge...  
> [2013-12-05T09:10:11+00:00] INFO: \*\*\* Chef 11.8.2 \*\*\*  
> [2013-12-05T09:10:11+00:00] INFO: Chef-client pid: 2663  
> [2013-12-05T09:10:11+00:00] INFO: Setting the run\_list to  
> ["recipe[application\_ruby]"] from JSON  
> [2013-12-05T09:10:11+00:00] INFO: Run List is [recipe[application\_ruby]]  
> [2013-12-05T09:10:11+00:00] INFO: Run List expands to [application\_ruby]  
> [2013-12-05T09:10:11+00:00] INFO: Starting Chef Run for devirsatel  
> [2013-12-05T09:10:11+00:00] INFO: Running start handlers  
> [2013-12-05T09:10:11+00:00] INFO: Start handlers complete.  
> [2013-12-05T09:10:12+00:00] WARN: Chef::Mixin::LanguageIncludeRecipe is  
> deprecated, use Chef::DSL::IncludeRecipe  
> instead.
> 
> [2013-12-05T09:10:12+00:00] WARN: Called from:  
> /tmp/vagrant-chef-1/chef-solo-1/cookbooks/application\_ruby/providers/passenger\_apache2.rb:20:in  
> `class_from_file' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.2/lib/chef/mixin/from_file.rb:42:in `class\_eval'  
> /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.2/lib/chef/mixin/from\_file.rb:42:in  
> `class\_from\_file'  
> [2013-12-05T09:10:12+00:00] WARN: Chef::Mixin::LanguageIncludeRecipe is  
> deprecated, use Chef::DSL::IncludeRecipe  
> instead.
> 
> [2013-12-05T09:10:12+00:00] WARN: Called from:  
> /tmp/vagrant-chef-1/chef-solo-1/cookbooks/application\_ruby/providers/unicorn.rb:21:in  
> `class_from_file' /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.2/lib/chef/mixin/from_file.rb:42:in `class\_eval'  
> /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.2/lib/chef/mixin/from\_file.rb:42:in  
> `class\_from\_file'  
> [2013-12-05T09:10:12+00:00] ERROR: Running exception handlers  
> [2013-12-05T09:10:12+00:00] ERROR: Exception handlers complete  
> [2013-12-05T09:10:12+00:00] FATAL: Stacktrace dumped to  
> /var/chef/cache/chef-stacktrace.out  
> [2013-12-05T09:10:12+00:00] ERROR: could not find recipe default for  
> cookbook application\_ruby
> 
> # ================================================================================ Recipe Compile Error
> 
> ## Chef::Exceptions::RecipeNotFound
> 
> could not find recipe default for cookbook application\_ruby
> 
> [2013-12-05T09:10:11+00:00] INFO: Forking chef instance to converge...  
> [2013-12-05T09:10:12+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.
> 
> On 5 December 2013 03:49, Lamont Granquist [lamont@opscode.com](mailto:lamont@opscode.com) wrote:
> 
> > A related change already went into the application cookbook so the latest  
> > major versions of both application and application\_ruby no longer support  
> > 10.x
> > 
> > On 12/4/13 2:59 PM, Stephen Lauck wrote:
> > 
> > Is this related to the deprecation warnings?
> > 
> > I have a pull request in if we want to assume Chef 11.
> > 
> > [fix deprecation warnings for Chef::DS?L::IncludeRecipe by stephenlauck · Pull Request #43 · poise/application\_ruby · GitHub](https://github.com/poise/application_ruby/pull/43)
> > 
> > On Wed, Dec 4, 2013 at 2:50 PM, Noah Kantrowitz [noah@coderanger.net](mailto:noah@coderanger.net)  
> > wrote:
> > 
> > > What version of Chef are you using?
> > > 
> > > --Noah
> > > 
> > > On Dec 4, 2013, at 2:48 PM, Rob Watkin [robwatkin@gmail.com](mailto:robwatkin@gmail.com) wrote:
> > > 
> > > > I'm getting the following error with application\_ruby. It's probably  
> > > > something I've missed. I'm running it locally with vagrant and berkshelf,  
> > > > both files below. Any help would be appreciated.
> > > > 
> > > > Thanks  
> > > > Rob
> > > > 
> > > > [2013-12-04T22:30:37+00:00] INFO: Start handlers complete.
> > > > 
> > > > ================================================================================  
> > > > Recipe Compile Error in  
> > > > /tmp/vagrant-chef-1/chef-solo-1/cookbooks/application/resources/default.rb
> > > > 
> > > > ================================================================================
> > > > 
> > > > ## NameError
> > > > 
> > > > uninitialized constant Chef::DSL
> > > > 
> > > > ## Cookbook Trace:
> > > > 
> > > > /tmp/vagrant-chef-1/chef-solo-1/cookbooks/application/resources/default.rb:23:in  
> > > > `class\_from\_file'
> > > > 
> > > > ## Relevant File Content:
> > > > 
> > > > /tmp/vagrant-chef-1/chef-solo-1/cookbooks/application/resources/default.rb:
> > > > 
> > > > 1: #  
> > > > 2: # Author:: Noah Kantrowitz [noah@opscode.com](mailto:noah@opscode.com)  
> > > > 3: # Cookbook Name:: application
> > > > 
> > > > # Vagrantfile
> > > > 
> > > > Vagrant.configure("2") do |config|  
> > > > config.vm.box = "Berkshelf-CentOS-6.3"  
> > > > config.berkshelf.enabled = true  
> > > > config.vm.box\_url =  
> > > > "[https://dl.dropbox.com/u/31081437/Berkshelf-CentOS-6.3-x86\_64-minimal.box](https://dl.dropbox.com/u/31081437/Berkshelf-CentOS-6.3-x86_64-minimal.box)"  
> > > > config.vm.hostname = "devirsatel"  
> > > > config.vm.network :forwarded\_port, guest: 8080, host: 9080  
> > > > config.vm.network :forwarded\_port, guest: 15672, host: 15672  
> > > > config.vm.provision :chef\_solo do |chef|  
> > > > chef.cookbooks\_path = "cookbooks"  
> > > > chef.add\_recipe "application\_ruby"  
> > > > chef.data\_bags\_path = "data\_bags"  
> > > > end  
> > > > end
> > > > 
> > > > # Berksfile
> > > > 
> > > > site :opscode  
> > > > cookbook "application\_ruby"

---

<div class="post-metadata">

**Author:** ![Rob\_Watkin](https://avatars.discourse-cdn.com/v4/letter/r/f17d59/32.png) [@Rob\_Watkin](https://discourse.chef.io/u/Rob_Watkin)\
**Post date:** [December 5, 2013, 1:37pm UTC](https://discourse.chef.io/t/application-ruby/4849/9 "2013-12-05T13:37:59Z")

</div>

Doh!  
Thanks Jorge

On 5 December 2013 11:13, Jorge Bianquetti [jbianquetti@gmail.com](mailto:jbianquetti@gmail.com) wrote:

> > ERROR: could not find recipe default for cookbook application\_ruby
> 
> You have recipe[application\_ruby] on the run\_list, and this cookbook  
> has not an default.rb recipe.  
> This kind of cookbook is called "library", because you need to  
> include them into other cookbooks recipes
> 
> 2013/12/5 Rob Watkin [robwatkin@gmail.com](mailto:robwatkin@gmail.com):
> 
> > Hence I've been experimenting with  
> > config.vm.provision :shell, :inline =\> "curl -L  
> > [https://www.opscode.com/chef/install.sh](https://www.opscode.com/chef/install.sh) | sudo bash"
> > 
> > So following your advice I'll keep that in there:
> > 
> > chef-repo$ vagrant ssh  
> > [vagrant@devirsatel ~]$ chef-solo --version  
> > Chef: 11.8.2  
> > [vagrant@devirsatel ~]$ chef-client --version  
> > Chef: 11.8.2
> > 
> > Now I get the error:
> > 
> > [2013-12-05T09:10:12+00:00] ERROR: could not find recipe default for  
> > cookbook application\_ruby
> > 
> > full listing below:
> > 
> > chef-repo$ vagrant up  
> > Bringing machine 'default' up with 'virtualbox' provider...  
> > [default] Importing base box 'Berkshelf-CentOS-6.3'...  
> > [default] Matching MAC address for NAT networking...  
> > [default] Setting the name of the VM...  
> > [default] Clearing any previously set forwarded ports...  
> > [Berkshelf] This version of the Berkshelf plugin has not been fully  
> > tested  
> > on this version of Vagrant.  
> > [Berkshelf] You should check for a newer version of vagrant-berkshelf.  
> > [Berkshelf] If you encounter any errors with this version, please report  
> > them at [Issues · berkshelf/vagrant-berkshelf · GitHub](https://github.com/RiotGames/vagrant-berkshelf/issues)  
> > [Berkshelf] You can also join the discussion in #berkshelf on Freenode.  
> > [Berkshelf] Updating Vagrant's berkshelf:
> 
> '/Users/rob/.berkshelf/default/vagrant/berkshelf-20131205-66017-jq94th-default'
> 
> > [Berkshelf] Using application\_ruby (3.0.2)  
> > [Berkshelf] Using unicorn (1.3.0)  
> > [Berkshelf] Using apache2 (1.8.4)  
> > [Berkshelf] Using passenger\_apache2 (2.1.2)  
> > [Berkshelf] Using build-essential (1.4.2)  
> > [Berkshelf] Using application (4.1.4)  
> > [Berkshelf] Using runit (1.4.0)  
> > [Berkshelf] Using yum (2.4.2)  
> > [Berkshelf] Using logrotate (1.4.0)  
> > [default] Creating shared folders metadata...  
> > [default] Clearing any previously set network interfaces...  
> > [default] Preparing network interfaces based on configuration...  
> > [default] Forwarding ports...  
> > [default] -- 22 =\> 2222 (adapter 1)  
> > [default] -- 8080 =\> 9080 (adapter 1)  
> > [default] -- 15672 =\> 15672 (adapter 1)  
> > [default] Booting VM...  
> > [default] Waiting for machine to boot. This may take a few minutes...  
> > [default] Machine booted and ready!  
> > [default] Setting hostname...  
> > [default] Mounting shared folders...  
> > [default] -- /vagrant  
> > [default] -- /tmp/vagrant-chef-1/chef-solo-1/cookbooks  
> > [default] -- /tmp/vagrant-chef-1/chef-solo-2/data\_bags  
> > [default] Running provisioner: shell...  
> > [default] Running: inline script  
> > % Total % Received % Xferd Average Speed Time Time Time  
> > Current  
> > Dload Upload Total Spent Left  
> > Speed  
> > 101 6790 101 6790 0 0 1173 0 0:00:05 0:00:05 --:--:--  
> > 25719  
> > Downloading Chef for el...  
> > Installing Chef  
> > warning: /tmp/tmp.TSFbNOSM/chef-.x86\_64.rpm: Header V4 DSA/SHA1  
> > Signature,  
> > key ID 83ef826a: NOKEY  
> > Preparing...  
> > ##################################################  
> > chef  
> > ##################################################  
> > Thank you for installing Chef!  
> > [default] Running provisioner: chef\_solo...  
> > Generating chef JSON and uploading...  
> > Running chef-solo...  
> > [2013-12-05T09:10:11+00:00] INFO: Forking chef instance to converge...  
> > [2013-12-05T09:10:11+00:00] INFO: \*\*\* Chef 11.8.2 \*\*\*  
> > [2013-12-05T09:10:11+00:00] INFO: Chef-client pid: 2663  
> > [2013-12-05T09:10:11+00:00] INFO: Setting the run\_list to  
> > ["recipe[application\_ruby]"] from JSON  
> > [2013-12-05T09:10:11+00:00] INFO: Run List is [recipe[application\_ruby]]  
> > [2013-12-05T09:10:11+00:00] INFO: Run List expands to [application\_ruby]  
> > [2013-12-05T09:10:11+00:00] INFO: Starting Chef Run for devirsatel  
> > [2013-12-05T09:10:11+00:00] INFO: Running start handlers  
> > [2013-12-05T09:10:11+00:00] INFO: Start handlers complete.  
> > [2013-12-05T09:10:12+00:00] WARN: Chef::Mixin::LanguageIncludeRecipe is  
> > deprecated, use Chef::DSL::IncludeRecipe  
> > instead.
> > 
> > [2013-12-05T09:10:12+00:00] WARN: Called from:
> 
> /tmp/vagrant-chef-1/chef-solo-1/cookbooks/application\_ruby/providers/passenger\_apache2.rb:20:in
> 
> > `class\_from\_file'
> 
> /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.2/lib/chef/mixin/from\_file.rb:42:in
> 
> > `class\_eval'
> 
> /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.2/lib/chef/mixin/from\_file.rb:42:in
> 
> > `class\_from\_file'  
> > [2013-12-05T09:10:12+00:00] WARN: Chef::Mixin::LanguageIncludeRecipe is  
> > deprecated, use Chef::DSL::IncludeRecipe  
> > instead.
> > 
> > [2013-12-05T09:10:12+00:00] WARN: Called from:
> 
> /tmp/vagrant-chef-1/chef-solo-1/cookbooks/application\_ruby/providers/unicorn.rb:21:in
> 
> > `class\_from\_file'
> 
> /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.2/lib/chef/mixin/from\_file.rb:42:in
> 
> > `class\_eval'
> 
> /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.2/lib/chef/mixin/from\_file.rb:42:in
> 
> > `class\_from\_file'  
> > [2013-12-05T09:10:12+00:00] ERROR: Running exception handlers  
> > [2013-12-05T09:10:12+00:00] ERROR: Exception handlers complete  
> > [2013-12-05T09:10:12+00:00] FATAL: Stacktrace dumped to  
> > /var/chef/cache/chef-stacktrace.out  
> > [2013-12-05T09:10:12+00:00] ERROR: could not find recipe default for  
> > cookbook application\_ruby
> 
> ================================================================================
> 
> > Recipe Compile Error
> 
> ================================================================================
> 
> > ## Chef::Exceptions::RecipeNotFound
> > 
> > could not find recipe default for cookbook application\_ruby
> > 
> > [2013-12-05T09:10:11+00:00] INFO: Forking chef instance to converge...  
> > [2013-12-05T09:10:12+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.
> > 
> > On 5 December 2013 03:49, Lamont Granquist [lamont@opscode.com](mailto:lamont@opscode.com) wrote:
> > 
> > > A related change already went into the application cookbook so the  
> > > latest  
> > > major versions of both application and application\_ruby no longer  
> > > support  
> > > 10.x
> > > 
> > > On 12/4/13 2:59 PM, Stephen Lauck wrote:
> > > 
> > > Is this related to the deprecation warnings?
> > > 
> > > I have a pull request in if we want to assume Chef 11.
> > > 
> > > [fix deprecation warnings for Chef::DS?L::IncludeRecipe by stephenlauck · Pull Request #43 · poise/application\_ruby · GitHub](https://github.com/poise/application_ruby/pull/43)
> > > 
> > > On Wed, Dec 4, 2013 at 2:50 PM, Noah Kantrowitz [noah@coderanger.net](mailto:noah@coderanger.net)  
> > > wrote:
> > > 
> > > > What version of Chef are you using?
> > > > 
> > > > --Noah
> > > > 
> > > > On Dec 4, 2013, at 2:48 PM, Rob Watkin [robwatkin@gmail.com](mailto:robwatkin@gmail.com) wrote:
> > > > 
> > > > > I'm getting the following error with application\_ruby. It's probably  
> > > > > something I've missed. I'm running it locally with vagrant and  
> > > > > berkshelf,  
> > > > > both files below. Any help would be appreciated.
> > > > > 
> > > > > Thanks  
> > > > > Rob
> > > > > 
> > > > > [2013-12-04T22:30:37+00:00] INFO: Start handlers complete.
> 
> ================================================================================
> 
> > > > > Recipe Compile Error in
> 
> /tmp/vagrant-chef-1/chef-solo-1/cookbooks/application/resources/default.rb
> 
> > > > >
> 
> ================================================================================
> 
> > > > > ## NameError
> > > > > 
> > > > > uninitialized constant Chef::DSL
> > > > > 
> > > > > ## Cookbook Trace:
> 
> /tmp/vagrant-chef-1/chef-solo-1/cookbooks/application/resources/default.rb:23:in
> 
> > > > > `class\_from\_file'
> > > > > 
> > > > > ## Relevant File Content:
> 
> /tmp/vagrant-chef-1/chef-solo-1/cookbooks/application/resources/default.rb:
> 
> > > > > 1: #  
> > > > > 2: # Author:: Noah Kantrowitz [noah@opscode.com](mailto:noah@opscode.com)  
> > > > > 3: # Cookbook Name:: application
> > > > > 
> > > > > # Vagrantfile
> > > > > 
> > > > > Vagrant.configure("2") do |config|  
> > > > > config.vm.box = "Berkshelf-CentOS-6.3"  
> > > > > config.berkshelf.enabled = true  
> > > > > config.vm.box\_url =  
> > > > > "  
> > > > > [https://dl.dropbox.com/u/31081437/Berkshelf-CentOS-6.3-x86\_64-minimal.box](https://dl.dropbox.com/u/31081437/Berkshelf-CentOS-6.3-x86_64-minimal.box)"  
> > > > > config.vm.hostname = "devirsatel"  
> > > > > config.vm.network :forwarded\_port, guest: 8080, host: 9080  
> > > > > config.vm.network :forwarded\_port, guest: 15672, host: 15672  
> > > > > config.vm.provision :chef\_solo do |chef|  
> > > > > chef.cookbooks\_path = "cookbooks"  
> > > > > chef.add\_recipe "application\_ruby"  
> > > > > chef.data\_bags\_path = "data\_bags"  
> > > > > end  
> > > > > end
> > > > > 
> > > > > # Berksfile
> > > > > 
> > > > > site :opscode  
> > > > > cookbook "application\_ruby"

---

<div class="post-metadata">

**Author:** ![Tensibai](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/tensibai/32/29_2.png) [@Tensibai](https://discourse.chef.io/u/Tensibai)\
**Post date:** [December 5, 2013, 2:29pm UTC](https://discourse.chef.io/t/application-ruby/4849/10 "2013-12-05T14:29:48Z")

</div>

Hi chefs,

I’ve an error after upgrading my open source chef-server to 11.0.10 to  
upload cookbooks:

in erchef current log I have:

2013-12-05\_14:20:03.31022 =ERROR REPORT==== 5-Dec-2013::14:20:03 ===  
2013-12-05\_14:20:03.31023 webmachine error: path="/sandboxes"  
2013-12-05\_14:20:03.31023 {error,{error,{badmatch,{error,no\_scheme}},  
2013-12-05\_14:20:03.31024  
[{mini\_s3,format\_s3\_uri,2,[{file,“src/mini\_s3.erl”},{line,415}]},  
2013-12-05\_14:20:03.31024  
{mini\_s3,s3\_url,6,[{file,“src/mini\_s3.erl”},{line,463}]},  
2013-12-05\_14:20:03.31025 {chef\_wm\_sandboxes,checksum\_data,3,  
2013-12-05\_14:20:03.31025 [{file,“src/chef\_wm\_sandboxes.erl”},  
2013-12-05\_14:20:03.31026 {line,128}]},  
2013-12-05\_14:20:03.31026  
{chef\_wm\_sandboxes,’-sandbox\_to\_response/2-lc$^0/1-0-’,2,  
2013-12-05\_14:20:03.31032 [{file,“src/chef\_wm\_sandboxes.erl”},  
2013-12-05\_14:20:03.31032 {line,112}]},  
2013-12-05\_14:20:03.31034 {chef\_wm\_sandboxes,sandbox\_to\_response,2,  
2013-12-05\_14:20:03.31034 [{file,“src/chef\_wm\_sandboxes.erl”},  
2013-12-05\_14:20:03.31035 {line,112}]},  
2013-12-05\_14:20:03.31036 {chef\_wm\_sandboxes,from\_json,2,  
2013-12-05\_14:20:03.31036 [{file,“src/chef\_wm\_sandboxes.erl”},  
2013-12-05\_14:20:03.31037 {line,89}]},  
2013-12-05\_14:20:03.31037 {webmachine\_resource,resource\_call,3,  
2013-12-05\_14:20:03.31039 [{file,“src/webmachine\_resource.erl”},  
2013-12-05\_14:20:03.31039 {line,166}]},  
2013-12-05\_14:20:03.31040 {webmachine\_resource,do,3,  
2013-12-05\_14:20:03.31040 [{file,“src/webmachine\_resource.erl”},  
2013-12-05\_14:20:03.31041 {line,125}]}]}}

I did try googling that but had no luck fixing it.

I really don’t know erlang enough to understand the error, no\_scheme on  
top of it, if someone could show e the way to look at I would really  
appreciate.

Regards,

Tensibai

---

<div class="post-metadata">

**Author:** ![kallistec](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/kallistec/32/23_2.png) [@kallistec](https://discourse.chef.io/u/kallistec)\
**Post date:** [December 5, 2013, 11:27pm UTC](https://discourse.chef.io/t/application-ruby/4849/11 "2013-12-05T23:27:04Z")

</div>

On Thursday, December 5, 2013 at 6:29 AM, Tensibai wrote:

> Hi chefs,  
> I've an error after upgrading my open source chef-server to 11.0.10 to upload cookbooks:  
> in erchef current log I have:  
> 2013-12-05\_14:20:03.31022 =ERROR REPORT==== 5-Dec-2013::14:20:03 ===  
> 2013-12-05\_14:20:03.31023 webmachine error: path="/sandboxes"  
> 2013-12-05\_14:20:03.31023 {error,{error,{badmatch,{error,no\_scheme}},  
> 2013-12-05\_14:20:03.31024 [{mini\_s3,format\_s3\_uri,2,[{file,"src/mini\_s3.erl"},{line,415}]},  
> 2013-12-05\_14:20:03.31024 {mini\_s3,s3\_url,6,[{file,"src/mini\_s3.erl"},{line,463}]},  
> 2013-12-05\_14:20:03.31025 {chef\_wm\_sandboxes,checksum\_data,3,  
> 2013-12-05\_14:20:03.31025 [{file,"src/chef\_wm\_sandboxes.erl"},  
> 2013-12-05\_14:20:03.31026 {line,128}]},  
> 2013-12-05\_14:20:03.31026 {chef\_wm\_sandboxes,'-sandbox\_to\_response/2-lc$^0/1-0-',2,  
> 2013-12-05\_14:20:03.31032 [{file,"src/chef\_wm\_sandboxes.erl"},  
> 2013-12-05\_14:20:03.31032 {line,112}]},  
> 2013-12-05\_14:20:03.31034 {chef\_wm\_sandboxes,sandbox\_to\_response,2,  
> 2013-12-05\_14:20:03.31034 [{file,"src/chef\_wm\_sandboxes.erl"},  
> 2013-12-05\_14:20:03.31035 {line,112}]},  
> 2013-12-05\_14:20:03.31036 {chef\_wm\_sandboxes,from\_json,2,  
> 2013-12-05\_14:20:03.31036 [{file,"src/chef\_wm\_sandboxes.erl"},  
> 2013-12-05\_14:20:03.31037 {line,89}]},  
> 2013-12-05\_14:20:03.31037 {webmachine\_resource,resource\_call,3,  
> 2013-12-05\_14:20:03.31039 [{file,"src/webmachine\_resource.erl"},  
> 2013-12-05\_14:20:03.31039 {line,166}]},  
> 2013-12-05\_14:20:03.31040 {webmachine\_resource,do,3,  
> 2013-12-05\_14:20:03.31040 [{file,"src/webmachine\_resource.erl"},  
> 2013-12-05\_14:20:03.31041 {line,125}]}]}}  
> I did try googling that but had no luck fixing it.  
> I really don't know erlang enough to understand the error, no\_scheme on top of it, if someone could show e the way to look at I would really appreciate.  
> Regards,  
> Tensibai

My somewhat wild guess is that it’s failing to generate a URL somewhere, which could be caused by a bad config value somewhere. For reference, I have this on a working test system (host is named ubuntu and I put that in /etc/hosts to talk to it).

sudo grep url /etc/chef-server/chef-server-running.json  
"url": "[https://ubuntu](https://ubuntu)",  
"s3\_url\_ttl": 900,  
"url": "[https://ubuntu](https://ubuntu)”,

HTH,

--  
Daniel DeLeo

---

<div class="post-metadata">

**Author:** ![Tensibai](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/tensibai/32/29_2.png) [@Tensibai](https://discourse.chef.io/u/Tensibai)\
**Post date:** [December 6, 2013, 8:57am UTC](https://discourse.chef.io/t/application-ruby/4849/12 "2013-12-06T08:57:21Z")

</div>

Le 2013-12-06 00:27, Daniel DeLeo a écrit :

> On Thursday, December 5, 2013 at 6:29 AM, Tensibai wrote:
> 
> > Hi chefs,
> > 
> > I've an error after upgrading my open source chef-server to 11.0.10 to upload cookbooks:
> > 
> > in erchef current log I have:
> > 
> > 2013-12-05\_14:20:03.31022 =ERROR REPORT==== 5-Dec-2013::14:20:03 ===  
> > 2013-12-05\_14:20:03.31023 webmachine error: path="/sandboxes"  
> > 2013-12-05\_14:20:03.31023 {error,{error,{badmatch,{error,no\_scheme}},  
> > 2013-12-05\_14:20:03.31024 [{mini\_s3,format\_s3\_uri,2,[{file,"src/mini\_s3.erl"},{line,415}]},  
> > 2013-12-05\_14:20:03.31024 {mini\_s3,s3\_url,6,[{file,"src/mini\_s3.erl"},{line,463}]},  
> > 2013-12-05\_14:20:03.31025 {chef\_wm\_sandboxes,checksum\_data,3,  
> > 2013-12-05\_14:20:03.31025 [{file,"src/chef\_wm\_sandboxes.erl"},  
> > 2013-12-05\_14:20:03.31026 {line,128}]},  
> > 2013-12-05\_14:20:03.31026 {chef\_wm\_sandboxes,'-sandbox\_to\_response/2-lc$^0/1-0-',2,  
> > 2013-12-05\_14:20:03.31032 [{file,"src/chef\_wm\_sandboxes.erl"},  
> > 2013-12-05\_14:20:03.31032 {line,112}]},  
> > 2013-12-05\_14:20:03.31034 {chef\_wm\_sandboxes,sandbox\_to\_response,2,  
> > 2013-12-05\_14:20:03.31034 [{file,"src/chef\_wm\_sandboxes.erl"},  
> > 2013-12-05\_14:20:03.31035 {line,112}]},  
> > 2013-12-05\_14:20:03.31036 {chef\_wm\_sandboxes,from\_json,2,  
> > 2013-12-05\_14:20:03.31036 [{file,"src/chef\_wm\_sandboxes.erl"},  
> > 2013-12-05\_14:20:03.31037 {line,89}]},  
> > 2013-12-05\_14:20:03.31037 {webmachine\_resource,resource\_call,3,  
> > 2013-12-05\_14:20:03.31039 [{file,"src/webmachine\_resource.erl"},  
> > 2013-12-05\_14:20:03.31039 {line,166}]},  
> > 2013-12-05\_14:20:03.31040 {webmachine\_resource,do,3,  
> > 2013-12-05\_14:20:03.31040 [{file,"src/webmachine\_resource.erl"},  
> > 2013-12-05\_14:20:03.31041 {line,125}]}]}}
> > 
> > I did try googling that but had no luck fixing it.
> > 
> > I really don't know erlang enough to understand the error, no\_scheme on top of it, if someone could show e the way to look at I would really appreciate.
> > 
> > Regards,
> > 
> > Tensibai
> 
> My somewhat wild guess is that it's failing to generate a URL somewhere, which could be caused by a bad config value somewhere. For reference, I have this on a working test system (host is named ubuntu and I put that in /etc/hosts to talk to it).
> 
> sudo grep url /etc/chef-server/chef-server-running.json  
> "url": "[https://ubuntu](https://ubuntu)",  
> "s3\_url\_ttl": 900,  
> "url": "[https://ubuntu](https://ubuntu)",
> 
> HTH,
> 
> --  
> Daniel DeLeo

Thanks, indeed it was my chef-server.rb not correct for bookshelf, I  
forgot to override bookshelf['url'] 😕

If it could be of some use to others using dns aliases what I did to get  
it working back:

1. suppress any alias/fqdn/ip enforced in chef-server.rb and  
chef-server-ctl reconfigure

2. grep hostname in chef-server-running.json and IP bindings

3. set hostname entries found in chef-server.rb and enforce the  
corresponding IP address where needed

What I ended with is overriding:

bookshelf['vip'] = "[p1frchef01.nantes.xxxxxxxx.fr](http://p1frchef01.nantes.xxxxxxxx.fr)"  
bookshelf['url'] = "[https://p1frchef01.nantes.xxxxxxxxxxx.fr](https://p1frchef01.nantes.xxxxxxxxxxx.fr)"  
bookshelf['listen'] = "0.0.0.0"

lb['vip'] = "172.30.1.xxx" #\<= what the fqdn below resolve to  
lb['api\_fqdn'] = '[p1frchef01.nantes.xxxxxxxx.fr](http://p1frchef01.nantes.xxxxxxxx.fr)'  
lb['web\_ui\_fqdn'] = '[p1frchef01.nantes.xxxxxxxx.fr](http://p1frchef01.nantes.xxxxxxxx.fr)'

nginx['server\_name'] = '[p1frchef01.nantes.xxxxxxxxxxxx.fr](http://p1frchef01.nantes.xxxxxxxxxxxx.fr)'  
nginx['url'] = '[https://p1frchef01.nantes.xxxxxxxxxxxxx.fr](https://p1frchef01.nantes.xxxxxxxxxxxxx.fr)'

I'm not sure the bookshelf['listen'] is necessary.

Regards.

Tensibai
