# How to create ruby gem

**URL:** <https://www.ruby-forum.com/t/how-to-create-ruby-gem/126794>\
**Category:** Rails\
**Created:** [January 22, 2008, 9:20am UTC](https://www.ruby-forum.com/t/how-to-create-ruby-gem/126794 "2008-01-22T09:20:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![pavanagrawal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/c57346/32.png) [@pavanagrawal](https://www.ruby-forum.com/u/pavanagrawal)\
**Post date:** [January 22, 2008, 9:20am UTC](https://www.ruby-forum.com/t/how-to-create-ruby-gem/126794/1 "2008-01-22T09:20:12Z")

</div>

Hi Guys,  
i need help on creating a gem. I am following following steps from

[http://groups.google.co.in/group/rubygems](http://groups.google.co.in/group/rubygems)

i started with installation of the new gem

step 1)—\> gem install newgem

step 2)—\> newgem   
here it creates the folder successfully with the name i gave, n it  
allows the manipulation which is required by me.

here comes my problem???  
step 3)—\> rake package  
while creating a gem with the “rake package command”, I came across an  
error saying “could’nt find HOME environment --expanding ‘~/hoerc’”  
which is followed by number of error lines…

c:/ruby/lib/ruby/gems/1.8/gems/hoe-1.4.0/lib/hoe.rb:327:in  
‘expand\_path’  
c:/ruby/lib/ruby/gems/1.8/gems/hoe-1.4.0/lib/hoe.rb:327:in  
‘with\_config’  
c:/ruby/lib/ruby/gems/1.8/gems/hoe-1.4.0/lib/hoe.rb:363:in  
‘define\_tasks’  
c:/ruby/lib/ruby/gems/1.8/gems/hoe-1.4.0/lib/hoe.rb:322:in  
‘initialize’  
./config/hoe.rb:50:in ‘new’

Regards,  
Pavan

---

<div class="post-metadata">

**Author:** ![pavanagrawal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/c57346/32.png) [@pavanagrawal](https://www.ruby-forum.com/u/pavanagrawal)\
**Post date:** [January 22, 2008, 10:24am UTC](https://www.ruby-forum.com/t/how-to-create-ruby-gem/126794/2 "2008-01-22T10:24:17Z")

</div>

On 22/01/2008, Pavan A. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> while creating a gem with the “rake package command”, I came across an  
> error saying “could’nt find HOME environment --expanding ‘~/hoerc’”

have you set the environment variable named ‘HOME’?

-Thomas

–  
Thomas P.  
removed\_email\_address@domain.invalid  
removed\_email\_address@domain.invalid  
BÃ¼ro: 030 - 830 353 88  
mobil: 0176 - 75 03 03 04  
Privat: 030 - 49 78 37 06

> **[thopre](https://thopre.wordpress.com/)**
>
> Entwicklungen für die Bühne des Lebens

[http://www.thopre.com/](http://www.thopre.com/)

---

<div class="post-metadata">

**Author:** ![pavanagrawal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/c57346/32.png) [@pavanagrawal](https://www.ruby-forum.com/u/pavanagrawal)\
**Post date:** [January 25, 2008, 11:19am UTC](https://www.ruby-forum.com/t/how-to-create-ruby-gem/126794/3 "2008-01-25T11:19:41Z")

</div>

ya I have set that… not worked???

---

<div class="post-metadata">

**Author:** ![pavanagrawal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/c57346/32.png) [@pavanagrawal](https://www.ruby-forum.com/u/pavanagrawal)\
**Post date:** [February 6, 2008, 9:31am UTC](https://www.ruby-forum.com/t/how-to-create-ruby-gem/126794/4 "2008-02-06T09:31:35Z")

</div>

Hey Thomas  
I have set it properly and now I can see errorless  
gem creation… thanks a lot.

---

<div class="post-metadata">

**Author:** ![pavanagrawal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/c57346/32.png) [@pavanagrawal](https://www.ruby-forum.com/u/pavanagrawal)\
**Post date:** [February 2, 2008, 6:16pm UTC](https://www.ruby-forum.com/t/how-to-create-ruby-gem/126794/5 "2008-02-02T18:16:02Z")

</div>

On 25/01/2008, Pavan A. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> ya I have set that… not worked???

sure?

what gives you

ENV[‘HOME’]

on your system?

-Thomas
