# "Support Files" in Rubygems

**URL:** <https://www.ruby-forum.com/t/support-files-in-rubygems/85862>\
**Category:** Ruby\
**Created:** [February 16, 2007, 9:41pm UTC](https://www.ruby-forum.com/t/support-files-in-rubygems/85862 "2007-02-16T21:41:11Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mhutter](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ed655f/32.png) [@mhutter](https://www.ruby-forum.com/u/mhutter)\
**Post date:** [February 16, 2007, 9:41pm UTC](https://www.ruby-forum.com/t/support-files-in-rubygems/85862/1 "2007-02-16T21:41:11Z")

</div>

Hi

Is it possible to include files in rubygems that are neither .rb nor  
documentation files? I would like to publish Mozilla’s cacert.pem in  
my gem but seemingly, rubygems does not include the pem file in the  
build gem.

You can find the Rakefile used to build the gem here:

[http://preview.tinyurl.com/yrce7b](http://preview.tinyurl.com/yrce7b)

Thanks in advance,

Manuel H.

---

<div class="post-metadata">

**Author:** ![mhutter](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ed655f/32.png) [@mhutter](https://www.ruby-forum.com/u/mhutter)\
**Post date:** [February 16, 2007, 9:44pm UTC](https://www.ruby-forum.com/t/support-files-in-rubygems/85862/2 "2007-02-16T21:44:11Z")

</div>

On 2/16/07, Manuel H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Is it possible to include files in rubygems that are neither .rb nor  
> documentation files? I would like to publish Mozilla’s cacert.pem in  
> my gem but seemingly, rubygems does not include the pem file in the  
> build gem.
> 
> You can find the Rakefile used to build the gem here:
> 
> [http://preview.tinyurl.com/yrce7b](http://preview.tinyurl.com/yrce7b)
> 
> Thanks in advance,

Yes. See PDF::Writer and various others for how to do this.

RubyGems doesn’t really care what you include; it just wants you to  
enumerate it.

-austin

---

<div class="post-metadata">

**Author:** ![mhutter](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ed655f/32.png) [@mhutter](https://www.ruby-forum.com/u/mhutter)\
**Post date:** [February 16, 2007, 10:06pm UTC](https://www.ruby-forum.com/t/support-files-in-rubygems/85862/3 "2007-02-16T22:06:13Z")

</div>

On Sat, Feb 17, 2007 at 05:40:06AM +0900, Manuel H. wrote:

> 

Feel free to take a look at the Rakefile for keybox, I have a ‘data’  
directory that gets included. FileList is your friend.

Here’s a patch to google4r HEAD that I think does what you want.

You’ll probably want to take advantage of spec.rdoc\_options to make sure  
that when the rdoc is generated from the gem that your ‘README’ is the  
main document.

Something like :

```
spec.rdoc_options = ["--line-numbers",
                     "--inline-source",
                     "--main","README"]

```

You can also add a task :debug\_gem (from hoe) which can help debug  
issues.

```
task :debug_gem do
    puts spec.to_ruby
end

```

enjoy,

-jeremy

---

<div class="post-metadata">

**Author:** ![mhutter](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ed655f/32.png) [@mhutter](https://www.ruby-forum.com/u/mhutter)\
**Post date:** [February 16, 2007, 10:27pm UTC](https://www.ruby-forum.com/t/support-files-in-rubygems/85862/4 "2007-02-16T22:27:14Z")

</div>

On Sat, Feb 17, 2007 at 06:12:02AM +0900, Eric H. wrote:

> Or you could just use Hoe and let somebody else (me) take care of  
> these things.

Yup, that would work too, hoe makes the common stuff pretty easy, and  
your publication to rubyforge and announcements and such.

-jeremy

---

<div class="post-metadata">

**Author:** ![mhutter](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ed655f/32.png) [@mhutter](https://www.ruby-forum.com/u/mhutter)\
**Post date:** [February 16, 2007, 10:12pm UTC](https://www.ruby-forum.com/t/support-files-in-rubygems/85862/5 "2007-02-16T22:12:13Z")

</div>

On Feb 16, 2007, at 13:05, Jeremy H. wrote:

> You’ll probably want to take advantage of spec.rdoc\_options to make  
> sure  
> that when the rdoc is generated from the gem that your ‘README’ is the  
> main document.
> 
> You can also add a task :debug\_gem (from hoe) which can help debug  
> issues.

Or you could just use Hoe and let somebody else (me) take care of  
these things.

---

<div class="post-metadata">

**Author:** ![mhutter](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ed655f/32.png) [@mhutter](https://www.ruby-forum.com/u/mhutter)\
**Post date:** [February 17, 2007, 1:40am UTC](https://www.ruby-forum.com/t/support-files-in-rubygems/85862/6 "2007-02-17T01:40:33Z")

</div>

Hi

Thank you all for your kind suggestions - they all solve my problem =)

I will certainly have a look at Hoe since it seems to be what I am  
trying to duplicate (although I could not find much documentation on  
it on the net).

Kind Regards,

Manuel
