application_ruby


#1

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
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”


#2

What version of Chef are you using?

–Noah

On Dec 4, 2013, at 2:48 PM, Rob Watkin 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
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”


#3

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

On Wed, Dec 4, 2013 at 2:50 PM, Noah Kantrowitz 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 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
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”


#4

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 | sudo bash”

which didn’t help

On 4 December 2013 22:50, Noah Kantrowitz 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 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
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”


#5

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 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 | sudo bash”

which didn’t help

On 4 December 2013 22:50, Noah Kantrowitz 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 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
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”


#6

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.

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"
>   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"
>

#7

Hence I’ve been experimenting with
config.vm.provision :shell, :inline => “curl -L
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 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:inclass_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:inclass_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 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.

https://github.com/poise/application_ruby/pull/43

On Wed, Dec 4, 2013 at 2:50 PM, Noah Kantrowitz noah@coderanger.netwrote:

What version of Chef are you using?

–Noah

On Dec 4, 2013, at 2:48 PM, Rob Watkin 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
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”


#8

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:

Hence I’ve been experimenting with
config.vm.provision :shell, :inline => “curl -L
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 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:inclass_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:inclass_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 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.

https://github.com/poise/application_ruby/pull/43

On Wed, Dec 4, 2013 at 2:50 PM, Noah Kantrowitz 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 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
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”


#9

Doh!
Thanks Jorge

On 5 December 2013 11:13, Jorge Bianquetti 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:

Hence I’ve been experimenting with
config.vm.provision :shell, :inline => “curl -L
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 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 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.

https://github.com/poise/application_ruby/pull/43

On Wed, Dec 4, 2013 at 2:50 PM, Noah Kantrowitz 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 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
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”


#10

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


#11

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”,
“s3_url_ttl”: 900,
“url”: "https://ubuntu”,

HTH,


Daniel DeLeo


#12

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”,
“s3_url_ttl”: 900,
“url”: “https://ubuntu”,

HTH,


Daniel DeLeo

Thanks, indeed it was my chef-server.rb not correct for bookshelf, I
forgot to override bookshelf[‘url’] :confused:

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"
bookshelf[‘url’] = "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
lb[‘web_ui_fqdn’] = ‘p1frchef01.nantes.xxxxxxxx.fr

nginx[‘server_name’] = 'p1frchef01.nantes.xxxxxxxxxxxx.fr
nginx[‘url’] = ‘https://p1frchef01.nantes.xxxxxxxxxxxxx.fr

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

Regards.

Tensibai