# First Gem -- What can I model after?

**URL:** <https://www.ruby-forum.com/t/first-gem-what-can-i-model-after/189913>\
**Category:** Ruby\
**Created:** [June 9, 2010, 8:43pm UTC](https://www.ruby-forum.com/t/first-gem-what-can-i-model-after/189913 "2010-06-09T20:43:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ziggles](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/7ba0ec/32.png) [@ziggles](https://www.ruby-forum.com/u/ziggles)\
**Post date:** [June 9, 2010, 8:43pm UTC](https://www.ruby-forum.com/t/first-gem-what-can-i-model-after/189913/1 "2010-06-09T20:43:23Z")

</div>

Hi guys,

I’m working to create my first gem which will be a super simple wrap of  
an API i find useful.

I was wondering if someone could point me @ an existing gem that is  
considered to be structured/coded well?

I’m not 100% sure where to start and after reading/watching a number of  
tutorials i see there are a ton of ways to do things.

thanks!

---

<div class="post-metadata">

**Author:** ![ziggles](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/7ba0ec/32.png) [@ziggles](https://www.ruby-forum.com/u/ziggles)\
**Post date:** [June 10, 2010, 2:31am UTC](https://www.ruby-forum.com/t/first-gem-what-can-i-model-after/189913/2 "2010-06-10T02:31:24Z")

</div>

Take a look on this nice Katz’s article:

> **[Using .gemspecs as Intended](https://yehudakatz.com/2010/04/02/using-gemspecs-as-intended/)**
>
> When you clone a repository containing a Unix tool (or download a tarball),
> there's a standard way to install it. This is expected to work without any other
> dependencies, on all machines where the tool is supported.
> 
> $ autoconf
> $ ./configure
> $ make
> $...

---

<div class="post-metadata">

**Author:** ![ziggles](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/7ba0ec/32.png) [@ziggles](https://www.ruby-forum.com/u/ziggles)\
**Post date:** [June 10, 2010, 1:25pm UTC](https://www.ruby-forum.com/t/first-gem-what-can-i-model-after/189913/3 "2010-06-10T13:25:48Z")

</div>

2010/6/10 Rein H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> On 2010-06-09 17:30:38 -0700, Eustáquio Rangel said:
> 
> > Take a look on this nice Katz’s article:
> > 
> > [Using .gemspecs as Intended](http://yehudakatz.com/2010/04/02/using-gemspecs-as-intended/)
> 
> Not really relevant.

I beg to differ. 🙂

---

<div class="post-metadata">

**Author:** ![ziggles](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/7ba0ec/32.png) [@ziggles](https://www.ruby-forum.com/u/ziggles)\
**Post date:** [June 10, 2010, 5:20pm UTC](https://www.ruby-forum.com/t/first-gem-what-can-i-model-after/189913/4 "2010-06-10T17:20:33Z")

</div>

On 2010-06-10 04:25:29 -0700, Eustáquio Rangel said:

> 2010/6/10 Rein H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):
> 
> > On 2010-06-09 17:30:38 -0700, Eustáquio Rangel said:
> > 
> > > Take a look on this nice Katz’s article:
> > > 
> > > [Using .gemspecs as Intended](http://yehudakatz.com/2010/04/02/using-gemspecs-as-intended/)
> > 
> > Not really relevant.
> 
> I beg to differ. 🙂

Of course you do. Nevertheless, Yehuda’s article on whether to include  
a gemspec file in a source code repository for use by automated build  
tools is at best only tangentally relevant to his question, which was  
about how to structure a gem’s source code. Perhaps once he has  
answered his question and written a gem, he might want to read that  
article.

---

<div class="post-metadata">

**Author:** ![ziggles](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/7ba0ec/32.png) [@ziggles](https://www.ruby-forum.com/u/ziggles)\
**Post date:** [June 10, 2010, 5:50am UTC](https://www.ruby-forum.com/t/first-gem-what-can-i-model-after/189913/5 "2010-06-10T05:50:58Z")

</div>

On 2010-06-09 17:30:38 -0700, Eustáquio Rangel said:

> Take a look on this nice Katz’s article:
> 
> [Using .gemspecs as Intended](http://yehudakatz.com/2010/04/02/using-gemspecs-as-intended/)

Not really relevant.

Look at the jeweler gem, it will help you create a directory structure  
for your Ruby gem with testing and etc. There are a number of  
well-written Ruby gems in github that you can use for examples.
