# \[ANN\] Mr Bones - 1.1.0

**URL:** <https://rubytalk.org/t/ann-mr-bones-1-1-0/43396>\
**Category:** ruby-talk\
**Created:** [29 December 2007 18:57 UTC](https://rubytalk.org/t/ann-mr-bones-1-1-0/43396 "2007-12-29T18:57:26Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tim\_Pease](https://avatars.discourse-cdn.com/v4/letter/t/3e96dc/32.png) [@Tim\_Pease](https://rubytalk.org/u/Tim_Pease)\
**Post date:** [29 December 2007 18:57 UTC](https://rubytalk.org/t/ann-mr-bones-1-1-0/43396/1 "2007-12-29T18:57:26Z")

</div>

Bones  
&nbsp;&nbsp;&nbsp;&nbsp;by Tim Pease  
&nbsp;&nbsp;&nbsp;&nbsp;\<[http://codeforpeople.rubyforge.org/bones](http://codeforpeople.rubyforge.org/bones)\>

== DESCRIPTION:

Mr Bones is a handy tool that builds a skeleton for your new Ruby projects.  
The skeleton contains some starter code and a collection of rake tasks to  
ease the management and deployment of your source code. Mr Bones is not  
viral -- all the code your project needs is included in the skeleton (no  
gem dependency required).

== FEATURES/PROBLEMS:

Mr Bones provides the following rake tasks:

&nbsp;&nbsp;clobber # Remove all build products  
&nbsp;&nbsp;doc # Alias to doc:rdoc  
&nbsp;&nbsp;doc:rdoc # Build the rdoc HTML Files  
&nbsp;&nbsp;doc:release # Publish RDoc to RubyForge  
&nbsp;&nbsp;doc:rerdoc # Force a rebuild of the RDOC files  
&nbsp;&nbsp;doc:ri # Generate ri locally for testing  
&nbsp;&nbsp;gem # Alias to gem:package  
&nbsp;&nbsp;gem:debug # Show information about the gem  
&nbsp;&nbsp;gem:gem # Build the gem file  
&nbsp;&nbsp;gem:install # Install the gem  
&nbsp;&nbsp;gem:package # Build all the packages  
&nbsp;&nbsp;gem:release # Package and upload to RubyForge  
&nbsp;&nbsp;gem:repackage # Force a rebuild of the package files  
&nbsp;&nbsp;gem:uninstall # Uninstall the gem  
&nbsp;&nbsp;manifest:check # Verify the manifest  
&nbsp;&nbsp;manifest:create # Create a new manifest  
&nbsp;&nbsp;notes # Enumerate all annotations  
&nbsp;&nbsp;notes:fixme # Enumerate all FIXME annotations  
&nbsp;&nbsp;notes:optimize # Enumerate all OPTIMIZE annotations  
&nbsp;&nbsp;notes:todo # Enumerate all TODO annotations  
&nbsp;&nbsp;spec:rcov # Run all specs with RCov  
&nbsp;&nbsp;spec:run # Run all specs with basic output  
&nbsp;&nbsp;spec:specdoc # Run all specs with text output  
&nbsp;&nbsp;test:rcov # Run rcov on the unit tests  
&nbsp;&nbsp;test:run # Run tests for run

The rake tasks in the Mr Bones framework can be found in the "tasks"  
directory. Add your own tasks there when you need more functionality.

== SYNOPSIS:

To create a new "Get Fuzzy" project:

&nbsp;&nbsp;bones get\_fuzzy

If a new release of Mr Bones comes out with better features the "Get Fuzzy"  
project will need to be updated:

&nbsp;&nbsp;bones --update get\_fuzzy

And if you ever get confused about what Mr Bones can do:

&nbsp;&nbsp;bones --help

== REQUIREMENTS:

Mr Bones does not have any "requirements", but if you do not have the  
following gems installed you will not get all that Mr Bones has to offer.

\* rubyforge - for easy gem publishing to [rubyforge.org](http://rubyforge.org)  
\* rcov - for code coverage testing  
\* rspec - if that's the way you roll

== INSTALL:

\* sudo gem install bones

See the Mr Bones webpage for more information and a little manual.  
\<[http://codeforpeople.rubyforge.org/bones](http://codeforpeople.rubyforge.org/bones)\>

Blessings,  
TwP

---

<div class="post-metadata">

**Author:** ![James\_Britt3](https://avatars.discourse-cdn.com/v4/letter/j/b782af/32.png) [@James\_Britt3](https://rubytalk.org/u/James_Britt3)\
**Post date:** [29 December 2007 19:46 UTC](https://rubytalk.org/t/ann-mr-bones-1-1-0/43396/2 "2007-12-29T19:46:52Z")

</div>

Tim Pease wrote:

> To create a new "Get Fuzzy" project:
> 
> &nbsp;&nbsp;bones get\_fuzzy

Looks very col. However, after installing the gem, I tried it out and got this:

james@james06:/tmp$ bones FOOBAR  
/usr/local/lib/ruby/gems/1.8/gems/rspec-1.1.1/lib/spec/runner/options.rb:216:in `files\_to\_load': File or directory not found: manifest:create (RuntimeError)

It does create the project directory, though.

However, if I cd to that folder and run

&nbsp;&nbsp;&nbsp;$ rake manifest:create

I get that same error.

In fact, this seems to happen with other rake tasks as well. For example:

james@james06:/tmp/FOOBAR$ rake clobber  
(in /tmp/FOOBAR)  
/usr/local/lib/ruby/gems/1.8/gems/rspec-1.1.1/lib/spec/runner/options.rb:216:in `files\_to\_load': File or directory not found: clobber (RuntimeError)

> **···**
>
> --  
> James Britt
> 
> "The greatest obstacle to discovery is not ignorance, but the illusion of knowledge."  
> &nbsp;&nbsp;- D. Boorstin

---

<div class="post-metadata">

**Author:** ![Ben\_Bleything1](https://avatars.discourse-cdn.com/v4/letter/b/3e96dc/32.png) [@Ben\_Bleything1](https://rubytalk.org/u/Ben_Bleything1)\
**Post date:** [29 December 2007 20:02 UTC](https://rubytalk.org/t/ann-mr-bones-1-1-0/43396/3 "2007-12-29T20:02:07Z")

</div>

How does Mr. Bones compare with rabal?

[http://copiousfreetime.rubyforge.org/rabal/](http://copiousfreetime.rubyforge.org/rabal/)

Ben

> **···**
>
> On Sun, Dec 30, 2007, Tim Pease wrote:
> 
> > Mr Bones is a handy tool that builds a skeleton for your new Ruby projects.  
> > The skeleton contains some starter code and a collection of rake tasks to  
> > ease the management and deployment of your source code. Mr Bones is not  
> > viral -- all the code your project needs is included in the skeleton (no  
> > gem dependency required).

---

<div class="post-metadata">

**Author:** ![Tim\_Pease](https://avatars.discourse-cdn.com/v4/letter/t/3e96dc/32.png) [@Tim\_Pease](https://rubytalk.org/u/Tim_Pease)\
**Post date:** [29 December 2007 20:22 UTC](https://rubytalk.org/t/ann-mr-bones-1-1-0/43396/4 "2007-12-29T20:22:05Z")

</div>

Same idea, but different implementation. Mr Bones is a bit simpler  
than Rabal. The main difference is (1) in how much of a skeleton is  
created (Mr Bones is a smaller skeleton) and (2) how the rake tasks  
are managed. Mr Bones does everything by setting project parameters in  
the top-level Rakefile. Rabal generates tasks specific to a particular  
project.

Blessings,  
TwP

> **···**
>
> On Dec 29, 2007 1:02 PM, Ben Bleything \<ben@bleything.net\> wrote:
> 
> > On Sun, Dec 30, 2007, Tim Pease wrote:  
> > \> Mr Bones is a handy tool that builds a skeleton for your new Ruby projects.  
> > \> The skeleton contains some starter code and a collection of rake tasks to  
> > \> ease the management and deployment of your source code. Mr Bones is not  
> > \> viral -- all the code your project needs is included in the skeleton (no  
> > \> gem dependency required).
> > 
> > How does Mr. Bones compare with rabal?
> > 
> > [http://copiousfreetime.rubyforge.org/rabal/](http://copiousfreetime.rubyforge.org/rabal/)

---

<div class="post-metadata">

**Author:** ![Tim\_Pease](https://avatars.discourse-cdn.com/v4/letter/t/3e96dc/32.png) [@Tim\_Pease](https://rubytalk.org/u/Tim_Pease)\
**Post date:** [29 December 2007 20:23 UTC](https://rubytalk.org/t/ann-mr-bones-1-1-0/43396/5 "2007-12-29T20:23:32Z")

</div>

Grrrr. Mr Bones is not playing nicely with RSpec 1.1.1 I'll look  
into it and see if I can patch things up between the two.

TwP

> **···**
>
> On Dec 29, 2007 12:46 PM, James Britt \<james.britt@gmail.com\> wrote:
> 
> > Tim Pease wrote:
> > 
> > \>  
> > \> To create a new "Get Fuzzy" project:  
> > \>  
> > \> bones get\_fuzzy  
> > \>
> > 
> > Looks very col. However, after installing the gem, I tried it out and  
> > got this:
> > 
> > james@james06:/tmp$ bones FOOBAR  
> > /usr/local/lib/ruby/gems/1.8/gems/rspec-1.1.1/lib/spec/runner/options.rb:216:in  
> > `files\_to\_load': File or directory not found: manifest:create (RuntimeError)
> > 
> > It does create the project directory, though.
> > 
> > However, if I cd to that folder and run
> > 
> > &nbsp;&nbsp;&nbsp;$ rake manifest:create
> > 
> > I get that same error.
> > 
> > In fact, this seems to happen with other rake tasks as well. For example:
> > 
> > james@james06:/tmp/FOOBAR$ rake clobber  
> > (in /tmp/FOOBAR)  
> > /usr/local/lib/ruby/gems/1.8/gems/rspec-1.1.1/lib/spec/runner/options.rb:216:in  
> > `files\_to\_load': File or directory not found: clobber (RuntimeError)

---

<div class="post-metadata">

**Author:** ![Tim\_Pease](https://avatars.discourse-cdn.com/v4/letter/t/3e96dc/32.png) [@Tim\_Pease](https://rubytalk.org/u/Tim_Pease)\
**Post date:** [29 December 2007 20:43 UTC](https://rubytalk.org/t/ann-mr-bones-1-1-0/43396/6 "2007-12-29T20:43:19Z")

</div>

Just fixed the bug and release a 1.1.1 version.

I was requiring the top-level RSpec file, "spec.rb", and that has an  
"at\_exit" handler that tries to run the tests specified on the command  
line. This just happens to be whatever rake task you were trying to  
run, and it complains that it can't find that file.

Fixed now.

Blessings,  
TwP

> **···**
>
> On Dec 29, 2007 12:46 PM, James Britt \<james.britt@gmail.com\> wrote:
> 
> > Looks very col. However, after installing the gem, I tried it out and  
> > got this:
> > 
> > james@james06:/tmp$ bones FOOBAR  
> > /usr/local/lib/ruby/gems/1.8/gems/rspec-1.1.1/lib/spec/runner/options.rb:216:in  
> > `files\_to\_load': File or directory not found: manifest:create (RuntimeError)

---

<div class="post-metadata">

**Author:** ![Jeremy\_McAnally1](https://avatars.discourse-cdn.com/v4/letter/j/eb8c5e/32.png) [@Jeremy\_McAnally1](https://rubytalk.org/u/Jeremy_McAnally1)\
**Post date:** [29 December 2007 21:09 UTC](https://rubytalk.org/t/ann-mr-bones-1-1-0/43396/7 "2007-12-29T21:09:05Z")

</div>

Or, for that matter, how is this different than newgem, hoe, echoe,  
and the others? Not a critical question (variety isn't bad at all),  
but I'm just wondering if there's an advantage over those libraries.

--Jeremy

> **···**
>
> On Dec 29, 2007 3:22 PM, Tim Pease \<tim.pease@gmail.com\> wrote:
> 
> > On Dec 29, 2007 1:02 PM, Ben Bleything \<ben@bleything.net\> wrote:  
> > \> On Sun, Dec 30, 2007, Tim Pease wrote:  
> > \> \> Mr Bones is a handy tool that builds a skeleton for your new Ruby projects.  
> > \> \> The skeleton contains some starter code and a collection of rake tasks to  
> > \> \> ease the management and deployment of your source code. Mr Bones is not  
> > \> \> viral -- all the code your project needs is included in the skeleton (no  
> > \> \> gem dependency required).  
> > \>  
> > \> How does Mr. Bones compare with rabal?  
> > \>  
> > \> [http://copiousfreetime.rubyforge.org/rabal/](http://copiousfreetime.rubyforge.org/rabal/)  
> > \>
> > 
> > Same idea, but different implementation. Mr Bones is a bit simpler  
> > than Rabal. The main difference is (1) in how much of a skeleton is  
> > created (Mr Bones is a smaller skeleton) and (2) how the rake tasks  
> > are managed. Mr Bones does everything by setting project parameters in  
> > the top-level Rakefile. Rabal generates tasks specific to a particular  
> > project.
> > 
> > Blessings,  
> > TwP
> 
> --  
> [http://www.jeremymcanally.com/](http://www.jeremymcanally.com/)
> 
> My books:  
> Ruby in Practice
> 
> > **[Ruby in Practice](https://www.manning.com/books/ruby-in-practice)**
> >
> > Like Ruby itself, Ruby in Practice will make you more productive. The book shows you practical techniques and strategies for small projects and large-scale environments. A cookbook-style reference, it gives you concrete examples of systems...
> 
> My free Ruby e-book
> 
> > **[Site not found · DreamHost](http://www.humblelittlerubybook.com/)**
> >
> > The owner of this domain has not yet uploaded their website.
> 
> My blogs:
> 
> > **[Site not found · DreamHost](http://www.mrneighborly.com/)**
> >
> > The owner of this domain has not yet uploaded their website.
> 
> [http://www.rubyinpractice.com/](http://www.rubyinpractice.com/)

---

<div class="post-metadata">

**Author:** ![James\_Britt3](https://avatars.discourse-cdn.com/v4/letter/j/b782af/32.png) [@James\_Britt3](https://rubytalk.org/u/James_Britt3)\
**Post date:** [29 December 2007 23:17 UTC](https://rubytalk.org/t/ann-mr-bones-1-1-0/43396/8 "2007-12-29T23:17:29Z")

</div>

Tim Pease wrote:

> Just fixed the bug and release a 1.1.1 version.
> 
> I was requiring the top-level RSpec file, "spec.rb", and that has an  
> "at\_exit" handler that tries to run the tests specified on the command  
> line. This just happens to be whatever rake task you were trying to  
> run, and it complains that it can't find that file.
> 
> Fixed now.

Thanks; that was fast!

James

---

<div class="post-metadata">

**Author:** ![Jeremy\_Hinegardner](https://avatars.discourse-cdn.com/v4/letter/j/65b543/32.png) [@Jeremy\_Hinegardner](https://rubytalk.org/u/Jeremy_Hinegardner)\
**Post date:** [31 December 2007 18:34 UTC](https://rubytalk.org/t/ann-mr-bones-1-1-0/43396/9 "2007-12-31T18:34:47Z")

</div>

Tim! I see what you've been doing on your vacation. Dang you, getting  
Mr. Bones out there before I can refactor Rabal. I love the name.

I'm sure Tim and I will have several conversations :-). We do happen to  
frequent the same coffee shop on an exteremely regular basis.

Oh, and Ben, look for a refactoring of Rabal in the coming months. I  
have a couple more ideas I need to work with.

enjoy,

-jeremy

> **···**
>
> On Sun, Dec 30, 2007 at 05:22:05AM +0900, Tim Pease wrote:
> 
> > On Dec 29, 2007 1:02 PM, Ben Bleything \<ben@bleything.net\> wrote:  
> > \> On Sun, Dec 30, 2007, Tim Pease wrote:  
> > \> \> Mr Bones is a handy tool that builds a skeleton for your new Ruby projects.  
> > \> \> The skeleton contains some starter code and a collection of rake tasks to  
> > \> \> ease the management and deployment of your source code. Mr Bones is not  
> > \> \> viral -- all the code your project needs is included in the skeleton (no  
> > \> \> gem dependency required).  
> > \>  
> > \> How does Mr. Bones compare with rabal?  
> > \>  
> > \> [http://copiousfreetime.rubyforge.org/rabal/](http://copiousfreetime.rubyforge.org/rabal/)  
> > \>
> > 
> > Same idea, but different implementation. Mr Bones is a bit simpler  
> > than Rabal. The main difference is (1) in how much of a skeleton is  
> > created (Mr Bones is a smaller skeleton) and (2) how the rake tasks  
> > are managed. Mr Bones does everything by setting project parameters in  
> > the top-level Rakefile. Rabal generates tasks specific to a particular  
> > project.
> 
> # --
> 
> Jeremy Hinegardner jeremy@hinegardner.org

---

<div class="post-metadata">

**Author:** ![nexneo](https://avatars.discourse-cdn.com/v4/letter/n/278dde/32.png) [@nexneo](https://rubytalk.org/u/nexneo)\
**Post date:** [5 January 2008 00:00 UTC](https://rubytalk.org/t/ann-mr-bones-1-1-0/43396/10 "2008-01-05T00:00:02Z")

</div>

> \> Looks very col. However, after installing the gem, I tried it out and  
> \> got this:
> 
> \> james@james06:/tmp$ bones FOOBAR  
> \> /usr/local/lib/ruby/gems/1.8/gems/rspec-1.1.1/lib/spec/runner/options.rb:216:in  
> \> `files\_to\_load': File or directory not found: manifest:create (RuntimeError)
> 
> Just fixed the bug and release a 1.1.1 version.
> 
> I was requiring the top-level RSpec file, "spec.rb", and that has an  
> "at\_exit" handler that tries to run the tests specified on the command  
> line. This just happens to be whatever rake task you were trying to  
> run, and it complains that it can't find that file.
> 
> Fixed now.

after running merb generator i get similar error.  
/Library/Ruby/Gems/1.8/gems/rspec-1.1.1/lib/spec/runner/options.rb:  
216:in `files\_to\_load': File or directory not found: info  
(RuntimeError)

is that related to above bug?

---

<div class="post-metadata">

**Author:** ![Caspar\_Florian\_Ebeli](https://avatars.discourse-cdn.com/v4/letter/c/839c29/32.png) [@Caspar\_Florian\_Ebeli](https://rubytalk.org/u/Caspar_Florian_Ebeli)\
**Post date:** [16 January 2008 10:35 UTC](https://rubytalk.org/t/ann-mr-bones-1-1-0/43396/11 "2008-01-16T10:35:55Z")

</div>

> > james@james06:/tmp$ bones FOOBAR  
> > /usr/local/lib/ruby/gems/1.8/gems/rspec-1.1.1/lib/spec/runner/options.rb:216:in  
> > `files\_to\_load': File or directory not found: manifest:create (RuntimeError)
> 
> Just fixed the bug and release a 1.1.1 version.

hm, seems to be still a problem, even using rspec 1.1.2:

/opt/local/lib/ruby/gems/1.8/gems/rspec-1.1.2/lib/spec/runner/options.rb:216:in  
`files\_to\_load': File or directory not found: test:units (RuntimeError)  
&nbsp;&nbsp;from  
/opt/local/lib/ruby/gems/1.8/gems/rspec-1.1.2/lib/spec/runner/options.rb:210:in  
`each'

Florian

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/\](http://www.ruby-forum.com/%5C).

---

<div class="post-metadata">

**Author:** ![Tim\_Pease](https://avatars.discourse-cdn.com/v4/letter/t/3e96dc/32.png) [@Tim\_Pease](https://rubytalk.org/u/Tim_Pease)\
**Post date:** [30 December 2007 00:45 UTC](https://rubytalk.org/t/ann-mr-bones-1-1-0/43396/12 "2007-12-30T00:45:53Z")

</div>

Regarding the rake tasks, Mr Bones is intended to put everything in  
the skeleton. Contrast this to hoe and echoe where you are relying on  
an external gem. With Mr Bones you can twiddle the tasks if they don't  
do what you need / like / desire. That is a little more difficult to  
do with the others.

Mr Bones has the upgrade flag for when you want to update your tasks.  
You have to update all your projects individually. Hoe and echoe  
simplify this since they are included in all your projects -- update  
those guys and all your projects are running the latests and greatest  
(which might or might not be what you want).

Anyway, Mr Bones is a little more work, but it provides more  
flexibility for my needs. Just thought I would share.

And what a great name!! "Mr Bones" 😉

Blessings,  
TwP

Happy New Year to all.

> **···**
>
> On Dec 29, 2007 2:09 PM, Jeremy McAnally \<jeremymcanally@gmail.com\> wrote:
> 
> > Or, for that matter, how is this different than newgem, hoe, echoe,  
> > and the others? Not a critical question (variety isn't bad at all),  
> > but I'm just wondering if there's an advantage over those libraries.

---

<div class="post-metadata">

**Author:** ![Tim\_Pease](https://avatars.discourse-cdn.com/v4/letter/t/3e96dc/32.png) [@Tim\_Pease](https://rubytalk.org/u/Tim_Pease)\
**Post date:** [16 January 2008 17:47 UTC](https://rubytalk.org/t/ann-mr-bones-1-1-0/43396/13 "2008-01-16T17:47:48Z")

</div>

If you have the following line anywhere in your source code

require 'spec'

RSpec is going to load an at\_exit handler that will try to run RSpec specifications. I had this require line in version 1.1.0 of Mr Bones. The release of Mr Bones 1.1.1 fixed that bug (Mr Bones is now up to 1.3.0 by the way).

Grep through you code and see if something has the line "require 'spec'". That is where the problem is coming from.

Blessings,  
TwP

> **···**
>
> On Jan 16, 2008, at 3:35 AM, Florian Ebeling wrote:
> 
> > > > james@james06:/tmp$ bones FOOBAR  
> > > > /usr/local/lib/ruby/gems/1.8/gems/rspec-1.1.1/lib/spec/runner/options.rb:216:in  
> > > > `files\_to\_load': File or directory not found: manifest:create (RuntimeError)
> > > 
> > > Just fixed the bug and release a 1.1.1 version.
> > 
> > hm, seems to be still a problem, even using rspec 1.1.2:
> > 
> > /opt/local/lib/ruby/gems/1.8/gems/rspec-1.1.2/lib/spec/runner/options.rb:216:in  
> > `files\_to\_load': File or directory not found: test:units (RuntimeError)  
> > from  
> > /opt/local/lib/ruby/gems/1.8/gems/rspec-1.1.2/lib/spec/runner/options.rb:210:in  
> > `each'

---

<div class="post-metadata">

**Author:** ![Matt\_Todd](https://avatars.discourse-cdn.com/v4/letter/m/ed8c4c/32.png) [@Matt\_Todd](https://rubytalk.org/u/Matt_Todd)\
**Post date:** [30 December 2007 04:17 UTC](https://rubytalk.org/t/ann-mr-bones-1-1-0/43396/14 "2007-12-30T04:17:33Z")

</div>

Sounds like a good implementation. I'll test it later and let you know  
how I feel.

I'm of the persuasion that likes very, very, very minimal overhead for  
something simple. Currently, my primary Gem project is Halcyon and  
with a single Rakefile I get by with packaging, locally installing,  
uninstalling, generating RDocs, etc. All that is required is my time  
to fill out the project information in the Rakefile and the directory  
structure to be sane.

Like I said, I'll take a look at it and see if it satisfies my  
ultra-slim mentality. 🙂

Matt

---

<div class="post-metadata">

**Author:** ![a11](https://yyz1.discourse-cdn.com/flex029/user_avatar/rubytalk.org/a11/32/8169_2.png) [@a11](https://rubytalk.org/u/a11)\
**Post date:** [16 January 2008 20:56 UTC](https://rubytalk.org/t/ann-mr-bones-1-1-0/43396/15 "2008-01-16T20:56:56Z")

</div>

just a quick note, if you ever load a lib with a screwy at\_exit handler you can monkey patch it by

&nbsp;&nbsp;&nbsp;require 'spec'  
&nbsp;&nbsp;&nbsp;at\_exit{ exit! } # discard \*all\* pervious exit handlers

sometimes handy - and dangerous...

a @ [http://codeforpeople.com/](http://codeforpeople.com/)

> **···**
>
> On Jan 16, 2008, at 10:47 AM, Tim Pease wrote:
> 
> > If you have the following line anywhere in your source code
> > 
> > require 'spec'
> > 
> > RSpec is going to load an at\_exit handler that will try to run RSpec specifications. I had this require line in version 1.1.0 of Mr Bones. The release of Mr Bones 1.1.1 fixed that bug (Mr Bones is now up to 1.3.0 by the way).
> > 
> > Grep through you code and see if something has the line "require 'spec'". That is where the problem is coming from.
> 
> --  
> share your knowledge. it's a way to achieve immortality.  
> h.h. the 14th dalai lama

---

<div class="post-metadata">

**Author:** ![Joel\_VanderWerf1](https://avatars.discourse-cdn.com/v4/letter/j/94ad74/32.png) [@Joel\_VanderWerf1](https://rubytalk.org/u/Joel_VanderWerf1)\
**Post date:** [16 January 2008 22:01 UTC](https://rubytalk.org/t/ann-mr-bones-1-1-0/43396/16 "2008-01-16T22:01:05Z")

</div>

ara.t.howard wrote:

> just a quick note, if you ever load a lib with a screwy at\_exit handler you can monkey patch it by
> 
> &nbsp;&nbsp;require 'spec'  
> &nbsp;&nbsp;at\_exit{ exit! } # discard \*all\* pervious exit handlers
> 
> sometimes handy - and dangerous...

Hm, what about this?

at\_exit do  
&nbsp;&nbsp;&nbsp;puts "foo"  
end  
at\_exit do  
&nbsp;&nbsp;&nbsp;puts "bar"  
end  
at\_exit do  
&nbsp;&nbsp;&nbsp;puts "baz"  
end

# end of existing code,  
# monkey patch begins below...

BEGIN {  
&nbsp;&nbsp;&nbsp;def at\_exit(&block)  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if $at\_exit\_handlers # or make this local to BEGIN and use define\_method  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$at\_exit\_handlers \<\< block  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$at\_exit\_handlers = [block]  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;super do  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;while block = $at\_exit\_handlers.pop  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;block[$at\_exit\_handlers]  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end  
&nbsp;&nbsp;&nbsp;end  
}

at\_exit do |remaining|  
&nbsp;&nbsp;&nbsp;remaining.delete\_if do |block|  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;eval("\_\_LINE\_\_", block) == 1 # or use \_\_FILE\_\_  
&nbsp;&nbsp;&nbsp;end  
&nbsp;&nbsp;&nbsp;puts "deleted foo handler"  
end

\_\_END\_\_

Output:

deleted foo handler  
baz  
bar

> **···**
>
> --  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407

---

<div class="post-metadata">

**Author:** ![a11](https://yyz1.discourse-cdn.com/flex029/user_avatar/rubytalk.org/a11/32/8169_2.png) [@a11](https://rubytalk.org/u/a11)\
**Post date:** [16 January 2008 23:51 UTC](https://rubytalk.org/t/ann-mr-bones-1-1-0/43396/17 "2008-01-16T23:51:02Z")

</div>

yeah - something like

require 'at\_exit\_stack'

would be a cool gem for sure!

a @ [http://codeforpeople.com/](http://codeforpeople.com/)

> **···**
>
> On Jan 16, 2008, at 3:01 PM, Joel VanderWerf wrote:
> 
> > ara.t.howard wrote:
> > 
> > > just a quick note, if you ever load a lib with a screwy at\_exit handler you can monkey patch it by  
> > > &nbsp;&nbsp;require 'spec'  
> > > &nbsp;&nbsp;at\_exit{ exit! } # discard \*all\* pervious exit handlers  
> > > sometimes handy - and dangerous...
> > 
> > Hm, what about this?
> > 
> > at\_exit do  
> > &nbsp;&nbsp;puts "foo"  
> > end  
> > at\_exit do  
> > &nbsp;&nbsp;puts "bar"  
> > end  
> > at\_exit do  
> > &nbsp;&nbsp;puts "baz"  
> > end
> > 
> > # end of existing code,  
> > # monkey patch begins below...
> > 
> > BEGIN {  
> > &nbsp;&nbsp;def at\_exit(&block)  
> > &nbsp;&nbsp;&nbsp;&nbsp;if $at\_exit\_handlers # or make this local to BEGIN and use define\_method  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$at\_exit\_handlers \<\< block  
> > &nbsp;&nbsp;&nbsp;&nbsp;else  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$at\_exit\_handlers = [block]  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;super do  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;while block = $at\_exit\_handlers.pop  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;block[$at\_exit\_handlers]  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end  
> > &nbsp;&nbsp;&nbsp;&nbsp;end  
> > &nbsp;&nbsp;end  
> > }
> > 
> > at\_exit do |remaining|  
> > &nbsp;&nbsp;remaining.delete\_if do |block|  
> > &nbsp;&nbsp;&nbsp;&nbsp;eval("\_\_LINE\_\_", block) == 1 # or use \_\_FILE\_\_  
> > &nbsp;&nbsp;end  
> > &nbsp;&nbsp;puts "deleted foo handler"  
> > end
> > 
> > \_\_END\_\_
> > 
> > Output:
> > 
> > deleted foo handler  
> > baz  
> > bar
> > 
> > --  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407
> 
> --  
> share your knowledge. it's a way to achieve immortality.  
> h.h. the 14th dalai lama
