# Bluepill error uninitialized constant Daemonization (NameError)

**URL:** <https://discourse.chef.io/t/bluepill-error-uninitialized-constant-daemonization-nameerror/2460>\
**Category:** Chef Infra (archive)\
**Created:** [February 16, 2012, 7:30pm UTC](https://discourse.chef.io/t/bluepill-error-uninitialized-constant-daemonization-nameerror/2460 "2012-02-16T19:30:46Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![millisami\_r](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/millisami_r/32/418_2.png) [@millisami\_r](https://discourse.chef.io/u/millisami_r)\
**Post date:** [February 16, 2012, 7:30pm UTC](https://discourse.chef.io/t/bluepill-error-uninitialized-constant-daemonization-nameerror/2460/1 "2012-02-16T19:30:46Z")

</div>

I installed chef\_server on ec2 ubuntu10.04 using rubygems n bluepill init style.

After installing the packages, bluepill blows up.  
The following is the debugg-ed log.

[https://gist.github.com/1847128](https://gist.github.com/1847128)

Google around and found one similar issue at bluepill’s issue at GH.  
[https://github.com/arya/bluepill/issues/132](https://github.com/arya/bluepill/issues/132)

## Are these both problem is the same one?

@millisami  
~ Sachin Sagar Rai  
Ruby on Rails Developer  
[http://tfm.com.np](http://tfm.com.np)  
[http://nepalonrails.tumblr.com](http://nepalonrails.tumblr.com)  
Sent with Sparrow ([http://www.sparrowmailapp.com/?sig](http://www.sparrowmailapp.com/?sig))

---

<div class="post-metadata">

**Author:** ![Joshua\_Timberman](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/joshua_timberman/32/424_2.png) [@Joshua\_Timberman](https://discourse.chef.io/u/Joshua_Timberman)\
**Post date:** [February 17, 2012, 4:25pm UTC](https://discourse.chef.io/t/bluepill-error-uninitialized-constant-daemonization-nameerror/2460/2 "2012-02-17T16:25:35Z")

</div>

Ohai,

On Thu, Feb 16, 2012 at 12:30 PM, Sachin Sagar Rai [millisami@gmail.com](mailto:millisami@gmail.com) wrote:

> I installed chef\_server on ec2 ubuntu10.04 using rubygems n bluepill init  
> style.
> 
> After installing the packages, bluepill blows up.  
> The following is the debugg-ed log.
> 
> [https://gist.github.com/1847128](https://gist.github.com/1847128)
> 
> Google around and found one similar issue at bluepill's issue at GH.  
> [https://github.com/arya/bluepill/issues/132](https://github.com/arya/bluepill/issues/132)
> 
> Are these both problem is the same one?

Yes. The STDERR shows the NameError exception coming from the bluepill  
gem itself. Did you try downgrading the daemons gem as suggested in  
that issue on the bluepill gem?

DEBUG: Processing bluepill\_service[chef-solr] on chef-server  
INFO: Processing bluepill\_service[chef-solr] action enable  
(chef-server::rubygems-install line 240)  
DEBUG: Checking status of service chef-solr  
DEBUG: Executing /usr/bin/bluepill chef-solr status  
DEBUG: ---- Begin output of /usr/bin/bluepill chef-solr status ----  
DEBUG: STDOUT:  
DEBUG: STDERR: /usr/lib/ruby/gems/1.8/gems/bluepill-0.0.55/lib/bluepill/process.rb:10:  
uninitialized constant Daemonization (NameError)  
from /usr/local/lib/site\_ruby/1.8/rubygems/custom\_require.rb:36:in  
`gem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'  
from /usr/lib/ruby/gems/1.8/gems/bluepill-0.0.55/lib/bluepill.rb:24  
from /usr/local/lib/site\_ruby/1.8/rubygems/custom\_require.rb:36:in  
`gem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'  
from /usr/lib/ruby/gems/1.8/gems/bluepill-0.0.55/bin/bluepill:3  
from /usr/bin/bluepill:19:in `load'  
from /usr/bin/bluepill:19  
DEBUG: ---- End output of /usr/bin/bluepill chef-solr status ----  
DEBUG: Ran /usr/bin/bluepill chef-solr status returned 1

--  
Opscode, Inc  
Joshua Timberman, Technical Program Manager  
IRC, Skype, Twitter, Github: jtimberman

---

<div class="post-metadata">

**Author:** ![millisami\_r](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/millisami_r/32/418_2.png) [@millisami\_r](https://discourse.chef.io/u/millisami_r)\
**Post date:** [February 17, 2012, 5:21pm UTC](https://discourse.chef.io/t/bluepill-error-uninitialized-constant-daemonization-nameerror/2460/3 "2012-02-17T17:21:05Z")

</div>

Yes, I logged in to the ec2 instance and installed the downgraded version as well.

But after installing it, when I try to run the bluepill service, it came out due to the error none of chef-server, chef-solr, chef-.... gems/binary is installed.

* * *

@millisami  
~ Sachin Sagar Rai  
Ruby on Rails Developer  
[http://tfm.com.np](http://tfm.com.np)  
[http://nepalonrails.tumblr.com](http://nepalonrails.tumblr.com)  
Sent with Sparrow ([http://www.sparrowmailapp.com/?sig](http://www.sparrowmailapp.com/?sig))

On Friday, February 17, 2012 at 10:10 PM, Joshua Timberman wrote:

> Ohai,
> 
> On Thu, Feb 16, 2012 at 12:30 PM, Sachin Sagar Rai \<[millisami@gmail.com](mailto:millisami@gmail.com) ([mailto:millisami@gmail.com](mailto:millisami@gmail.com))\> wrote:
> 
> > I installed chef\_server on ec2 ubuntu10.04 using rubygems n bluepill init  
> > style.
> > 
> > After installing the packages, bluepill blows up.  
> > The following is the debugg-ed log.
> > 
> > [https://gist.github.com/1847128](https://gist.github.com/1847128)
> > 
> > Google around and found one similar issue at bluepill's issue at GH.  
> > [https://github.com/arya/bluepill/issues/132](https://github.com/arya/bluepill/issues/132)
> > 
> > Are these both problem is the same one?
> 
> Yes. The STDERR shows the NameError exception coming from the bluepill  
> gem itself. Did you try downgrading the daemons gem as suggested in  
> that issue on the bluepill gem?
> 
> DEBUG: Processing bluepill\_service[chef-solr] on chef-server  
> INFO: Processing bluepill\_service[chef-solr] action enable  
> (chef-server::rubygems-install line 240)  
> DEBUG: Checking status of service chef-solr  
> DEBUG: Executing /usr/bin/bluepill chef-solr status  
> DEBUG: ---- Begin output of /usr/bin/bluepill chef-solr status ----  
> DEBUG: STDOUT:  
> DEBUG: STDERR: /usr/lib/ruby/gems/1.8/gems/bluepill-0.0.55/lib/bluepill/process.rb:10:  
> uninitialized constant Daemonization (NameError)  
> from /usr/local/lib/site\_ruby/1.8/rubygems/custom\_require.rb:36:in  
> `gem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'  
> from /usr/lib/ruby/gems/1.8/gems/bluepill-0.0.55/lib/bluepill.rb:24  
> from /usr/local/lib/site\_ruby/1.8/rubygems/custom\_require.rb:36:in  
> `gem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'  
> from /usr/lib/ruby/gems/1.8/gems/bluepill-0.0.55/bin/bluepill:3  
> from /usr/bin/bluepill:19:in `load'  
> from /usr/bin/bluepill:19  
> DEBUG: ---- End output of /usr/bin/bluepill chef-solr status ----  
> DEBUG: Ran /usr/bin/bluepill chef-solr status returned 1
> 
> --  
> Opscode, Inc  
> Joshua Timberman, Technical Program Manager  
> IRC, Skype, Twitter, Github: jtimberman

---

<div class="post-metadata">

**Author:** ![Joshua\_Timberman](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/joshua_timberman/32/424_2.png) [@Joshua\_Timberman](https://discourse.chef.io/u/Joshua_Timberman)\
**Post date:** [February 18, 2012, 3:52am UTC](https://discourse.chef.io/t/bluepill-error-uninitialized-constant-daemonization-nameerror/2460/4 "2012-02-18T03:52:07Z")

</div>

On Fri, Feb 17, 2012 at 10:21 AM, Sachin Sagar Rai [millisami@gmail.com](mailto:millisami@gmail.com) wrote:

> Yes, I logged in to the ec2 instance and installed the downgraded version as  
> well.
> 
> But after installing it, when I try to run the bluepill service, it came out  
> due to the error none of chef-server, chef-solr, chef-.... gems/binary is  
> installed.

Did you install RubyGems from source or as a package?

If you're using Ubuntu/Debian and you installed RubyGems as a package,  
then the binaries are in:

/var/lib/gems/1.8/bin

(by default)

This is one reason why we recommend users install RubyGems from source  
in the installation instructions for the Chef Server.

---

<div class="post-metadata">

**Author:** ![millisami\_r](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/millisami_r/32/418_2.png) [@millisami\_r](https://discourse.chef.io/u/millisami_r)\
**Post date:** [February 18, 2012, 11:35am UTC](https://discourse.chef.io/t/bluepill-error-uninitialized-constant-daemonization-nameerror/2460/5 "2012-02-18T11:35:41Z")

</div>

Oh, I installed it using the package ruby coz:

1. I found installing via package much faster than via source
2. Your blog post at [http://jtimberman.housepub.org/blog/2011/11/24/ruby-in-ubuntu-11-dot-10/](http://jtimberman.housepub.org/blog/2011/11/24/ruby-in-ubuntu-11-dot-10/) also inspired me to do it the package way.

Alright, I'll install it using source and see.

But the question still remains, if I do it the source way, will the bug with the bluepill will fix it?

* * *

@millisami  
~ Sachin Sagar Rai  
Ruby on Rails Developer  
[http://tfm.com.np](http://tfm.com.np)  
[http://nepalonrails.tumblr.com](http://nepalonrails.tumblr.com)  
Sent with Sparrow ([http://www.sparrowmailapp.com/?sig](http://www.sparrowmailapp.com/?sig))

On Saturday, February 18, 2012 at 9:37 AM, Joshua Timberman wrote:

> On Fri, Feb 17, 2012 at 10:21 AM, Sachin Sagar Rai \<[millisami@gmail.com](mailto:millisami@gmail.com) ([mailto:millisami@gmail.com](mailto:millisami@gmail.com))\> wrote:
> 
> > Yes, I logged in to the ec2 instance and installed the downgraded version as  
> > well.
> > 
> > But after installing it, when I try to run the bluepill service, it came out  
> > due to the error none of chef-server, chef-solr, chef-.... gems/binary is  
> > installed.
> 
> Did you install RubyGems from source or as a package?
> 
> If you're using Ubuntu/Debian and you installed RubyGems as a package,  
> then the binaries are in:
> 
> /var/lib/gems/1.8/bin
> 
> (by default)
> 
> This is one reason why we recommend users install RubyGems from source  
> in the installation instructions for the Chef Server.

---

<div class="post-metadata">

**Author:** ![Akzhan\_Abdulin](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/akzhan_abdulin/32/465_2.png) [@Akzhan\_Abdulin](https://discourse.chef.io/u/Akzhan_Abdulin)\
**Post date:** [February 18, 2012, 1:15pm UTC](https://discourse.chef.io/t/bluepill-error-uninitialized-constant-daemonization-nameerror/2460/6 "2012-02-18T13:15:35Z")

</div>

This is problem that refs bluepill/131, bluepill/132, bluepill/136 (Author  
of Daemons gem have changed undocumented API that was used by bluepill).

Should be worarounded by bluepill 0.56 that restricts using of daemons gem.

2012/2/16 Sachin Sagar Rai [millisami@gmail.com](mailto:millisami@gmail.com)

> I installed chef\_server on ec2 ubuntu10.04 using rubygems n bluepill init  
> style.
> 
> After installing the packages, bluepill blows up.  
> The following is the debugg-ed log.
> 
> [https://gist.github.com/1847128](https://gist.github.com/1847128)
> 
> Google around and found one similar issue at bluepill's issue at GH.  
> [https://github.com/arya/bluepill/issues/132](https://github.com/arya/bluepill/issues/132)
> 
> ## Are these both problem is the same one?
> 
> @millisami  
> ~ Sachin Sagar Rai  
> Ruby on Rails Developer  
> [http://tfm.com.np](http://tfm.com.np)  
> [http://nepalonrails.tumblr.com](http://nepalonrails.tumblr.com)  
> Sent with Sparrow [http://www.sparrowmailapp.com/?sig](http://www.sparrowmailapp.com/?sig)

---

<div class="post-metadata">

**Author:** ![millisami\_r](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/millisami_r/32/418_2.png) [@millisami\_r](https://discourse.chef.io/u/millisami_r)\
**Post date:** [February 18, 2012, 5:58pm UTC](https://discourse.chef.io/t/bluepill-error-uninitialized-constant-daemonization-nameerror/2460/7 "2012-02-18T17:58:23Z")

</div>

@akzhan  
I again fired a new ec2 "knife ec2 server create ........."  
Its still the same error though using bluepill 0.56

Here is the logout. [https://gist.github.com/1860388](https://gist.github.com/1860388)

* * *

@millisami  
~ Sachin Sagar Rai  
Ruby on Rails Developer  
[http://tfm.com.np](http://tfm.com.np)  
[http://nepalonrails.tumblr.com](http://nepalonrails.tumblr.com)  
Sent with Sparrow ([http://www.sparrowmailapp.com/?sig](http://www.sparrowmailapp.com/?sig))

On Saturday, February 18, 2012 at 7:00 PM, Akzhan Abdulin wrote:

> This is problem that refs bluepill/131, bluepill/132, bluepill/136 (Author of Daemons gem have changed undocumented API that was used by bluepill).
> 
> Should be worarounded by bluepill 0.56 that restricts using of daemons gem.
> 
> 2012/2/16 Sachin Sagar Rai \<[millisami@gmail.com](mailto:millisami@gmail.com) ([mailto:millisami@gmail.com](mailto:millisami@gmail.com))\>
> 
> > I installed chef\_server on ec2 ubuntu10.04 using rubygems n bluepill init style.
> > 
> > After installing the packages, bluepill blows up.  
> > The following is the debugg-ed log.
> > 
> > [https://gist.github.com/1847128](https://gist.github.com/1847128)
> > 
> > Google around and found one similar issue at bluepill's issue at GH.  
> > [https://github.com/arya/bluepill/issues/132](https://github.com/arya/bluepill/issues/132)
> > 
> > ## Are these both problem is the same one?
> > 
> > @millisami  
> > ~ Sachin Sagar Rai  
> > Ruby on Rails Developer  
> > [http://tfm.com.np](http://tfm.com.np)  
> > [http://nepalonrails.tumblr.com](http://nepalonrails.tumblr.com)  
> > Sent with Sparrow ([http://www.sparrowmailapp.com/?sig](http://www.sparrowmailapp.com/?sig))

---

<div class="post-metadata">

**Author:** ![Joshua\_Timberman](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/joshua_timberman/32/424_2.png) [@Joshua\_Timberman](https://discourse.chef.io/u/Joshua_Timberman)\
**Post date:** [February 18, 2012, 10:03pm UTC](https://discourse.chef.io/t/bluepill-error-uninitialized-constant-daemonization-nameerror/2460/8 "2012-02-18T22:03:46Z")

</div>

On Sat, Feb 18, 2012 at 6:15 AM, Akzhan Abdulin  
[akzhan.abdulin@gmail.com](mailto:akzhan.abdulin@gmail.com) wrote:

> This is problem that refs bluepill/131, bluepill/132, bluepill/136 (Author  
> of Daemons gem have changed undocumented API that was used by bluepill).
> 
> Should be worarounded by bluepill 0.56 that restricts using of daemons gem.

Per the daemons gem author:

Date: 2012-02-17 12:31  
Sender: Thomas Uehlinger

While the Daemonize module was never part of daemons' API (for  
example no documentation refers to it), I agree that the change  
of name was unnecessary. Therefore I had immediately reverted  
that change and released 1.1.8. bluepill should therefore work  
without problems with 1.1.8. After now also having yanked 1.1.7,  
I don't see a reason to bump to 1.2 as there are now no breaking  
gems in 1.1.\*.

Via its tracker:  
[http://rubyforge.org/tracker/index.php?func=detail&aid=29516&group\_id=524&atid=2084](http://rubyforge.org/tracker/index.php?func=detail&aid=29516&group_id=524&atid=2084)

I posted this to the bluepill issue as well.

--  
Opscode, Inc  
Joshua Timberman, Technical Program Manager  
IRC, Skype, Twitter, Github: jtimberman

---

<div class="post-metadata">

**Author:** ![millisami\_r](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/millisami_r/32/418_2.png) [@millisami\_r](https://discourse.chef.io/u/millisami_r)\
**Post date:** [February 19, 2012, 5:24pm UTC](https://discourse.chef.io/t/bluepill-error-uninitialized-constant-daemonization-nameerror/2460/9 "2012-02-19T17:24:32Z")

</div>

Hi, I am really frustrated with the installation of the chef-server via the cookbook.  
I almost tried every possible way to installing chef-server and every time I face a new error. Is it just me or anybody else too? Or am I so stupid enough!!  
Due to the installation problem with the rubygems n bluepill way, I tried to install using the default recipe.  
Here too, I failed with the error: [Sun, 19 Feb 2012 17:09:59 +0000] FATAL: Errno::ECONNREFUSED: http\_request[compact chef couchDB] (chef-server::default line 24) had an error: Errno::ECONNREFUSED: Connection refused - connect(2)

This time the chef\_server role I modified is:

name "chef\_server"  
description "Setup a chef-server on an instance"  
run\_list(  
"recipe[chef-server]"  
)  
override\_attributes(  
:chef\_server =\> {  
:init\_style =\> 'init',  
:webui\_enabled =\> true  
}  
)

and the debug-log at: [https://gist.github.com/1864698](https://gist.github.com/1864698)

Why isn't it stable enough or I might be lacking the experience?  
Sometimes it gets so frustrating!!!

* * *

@millisami  
~ Sachin Sagar Rai  
Ruby on Rails Developer  
[http://tfm.com.np](http://tfm.com.np)  
[http://nepalonrails.tumblr.com](http://nepalonrails.tumblr.com)  
Sent with Sparrow ([http://www.sparrowmailapp.com/?sig](http://www.sparrowmailapp.com/?sig))

On Sunday, February 19, 2012 at 3:48 AM, Joshua Timberman wrote:

> On Sat, Feb 18, 2012 at 6:15 AM, Akzhan Abdulin  
> \<[akzhan.abdulin@gmail.com](mailto:akzhan.abdulin@gmail.com) ([mailto:akzhan.abdulin@gmail.com](mailto:akzhan.abdulin@gmail.com))\> wrote:
> 
> > This is problem that refs bluepill/131, bluepill/132, bluepill/136 (Author  
> > of Daemons gem have changed undocumented API that was used by bluepill).
> > 
> > Should be worarounded by bluepill 0.56 that restricts using of daemons gem.
> 
> Per the daemons gem author:
> 
> Date: 2012-02-17 12:31  
> Sender: Thomas Uehlinger
> 
> While the Daemonize module was never part of daemons' API (for  
> example no documentation refers to it), I agree that the change  
> of name was unnecessary. Therefore I had immediately reverted  
> that change and released 1.1.8. bluepill should therefore work  
> without problems with 1.1.8. After now also having yanked 1.1.7,  
> I don't see a reason to bump to 1.2 as there are now no breaking  
> gems in 1.1.\*.
> 
> Via its tracker:  
> [http://rubyforge.org/tracker/index.php?func=detail&aid=29516&group\_id=524&atid=2084](http://rubyforge.org/tracker/index.php?func=detail&aid=29516&group_id=524&atid=2084)
> 
> I posted this to the bluepill issue as well.
> 
> --  
> Opscode, Inc  
> Joshua Timberman, Technical Program Manager  
> IRC, Skype, Twitter, Github: jtimberman
