# Gem help!

**URL:** <https://www.ruby-forum.com/t/gem-help/93286>\
**Category:** Ruby\
**Created:** [November 21, 2005, 2:45am UTC](https://www.ruby-forum.com/t/gem-help/93286 "2005-11-21T02:45:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ara.t.howard](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/a8b319/32.png) [@ara.t.howard](https://www.ruby-forum.com/u/ara.t.howard)\
**Post date:** [November 21, 2005, 2:45am UTC](https://www.ruby-forum.com/t/gem-help/93286/1 "2005-11-21T02:45:33Z")

</div>

i have the somewhat standard lib dir hiearchy which looks like

lib/  
lib/foo.rb  
lib/foo/  
lib/foo/a.rb  
lib/foo/b.rb

here foo.rb obviously does a relative require of both foo/a.rb and  
foo/b.rb.

my gemspec has something like

spec.files = Dir[File::join("{lib,bin}", “\*”)]

but, for some reason, the foo/ directory is not included in the gem!  
any  
thoughts on how to do this?

cheers.

-a

---

<div class="post-metadata">

**Author:** ![ara.t.howard](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/a8b319/32.png) [@ara.t.howard](https://www.ruby-forum.com/u/ara.t.howard)\
**Post date:** [November 21, 2005, 9:19am UTC](https://www.ruby-forum.com/t/gem-help/93286/2 "2005-11-21T09:19:40Z")

</div>

On Monday 21 November 2005 02:44, Ara.T.Howard wrote:

> my gemspec has something like
> 
> spec.files = Dir[File::join("{lib,bin}", “\*”)]
> 
> but, for some reason, the foo/ directory is not included in the  
> gem! any thoughts on how to do this?

Try this:

```
spec.files = Dir[File::join("{lib,bin}", "**", "*")]

```

Which is as well as:

```
spec.files = Dir["{lib,bin}/**/*"]

```

It builds a list of all entries under lib/ and bin/, also recursing  
into subdirectories.

HTH,  
Stefan

---

<div class="post-metadata">

**Author:** ![ara.t.howard](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/a8b319/32.png) [@ara.t.howard](https://www.ruby-forum.com/u/ara.t.howard)\
**Post date:** [November 21, 2005, 3:39pm UTC](https://www.ruby-forum.com/t/gem-help/93286/3 "2005-11-21T15:39:47Z")

</div>

On Mon, 21 Nov 2005, Stefan L. wrote:

> > foo/b.rb.  
> > spec.files = Dir[File::join("{lib,bin}", “\*\*”, “\*”)]
> 
> Which is as well as:
> 
> spec.files = Dir[“{lib,bin}/\*\*/\*”]
> 
> It builds a list of all entries under lib/ and bin/, also recursing  
> into subdirectories.

yeah - that’s what i ended up doing. strange that Gem::Specification  
silently  
ignores directories though…

-a
