# Using hoe to create gems with C extensions

**URL:** <https://www.ruby-forum.com/t/using-hoe-to-create-gems-with-c-extensions/124391>\
**Category:** Ruby\
**Created:** [December 28, 2007, 9:09am UTC](https://www.ruby-forum.com/t/using-hoe-to-create-gems-with-c-extensions/124391 "2007-12-28T09:09:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dido\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b3f665/32.png) [@Dido\_S](https://www.ruby-forum.com/u/Dido_S)\
**Post date:** [December 28, 2007, 9:09am UTC](https://www.ruby-forum.com/t/using-hoe-to-create-gems-with-c-extensions/124391/1 "2007-12-28T09:09:56Z")

</div>

As far as I can tell, Hoe by itself doesn’t have anything available to  
facilitate the creation of gems that contain C extensions. Of the gems  
that I have installed which do have extensions, none of them seem to  
also use hoe, so I don’t really have any examples to go by. Any  
suggestions for best practice when doing this sort of thing?

---

<div class="post-metadata">

**Author:** ![Dido\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b3f665/32.png) [@Dido\_S](https://www.ruby-forum.com/u/Dido_S)\
**Post date:** [December 28, 2007, 10:53am UTC](https://www.ruby-forum.com/t/using-hoe-to-create-gems-with-c-extensions/124391/2 "2007-12-28T10:53:25Z")

</div>

On Dec 28, 2007, at 00:09 , Dido S. wrote:

> As far as I can tell, Hoe by itself doesn’t have anything available to  
> facilitate the creation of gems that contain C extensions. Of the gems  
> that I have installed which do have extensions, none of them seem to  
> also use hoe, so I don’t really have any examples to go by. Any  
> suggestions for best practice when doing this sort of thing?

Hoe just sits on top of rake and generates your gemspec (and a bunch  
of tasks). There isn’t really anything for hoe to do for extensions  
(tho suggestions are welcome). So, almost the same way you’d do it via  
a plain gem:

Hoe.new(‘blah’, Blah::VERSION) do |p|  
p.spec\_extras[:extensions] = [“extconf.rb”] # or whatever style  
extension  
end
