# How to create gem

**URL:** <https://www.ruby-forum.com/t/how-to-create-gem/126193>\
**Category:** Rails\
**Created:** [January 16, 2008, 6:20am UTC](https://www.ruby-forum.com/t/how-to-create-gem/126193 "2008-01-16T06:20:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![teena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/9fc29f/32.png) [@teena](https://www.ruby-forum.com/u/teena)\
**Post date:** [January 16, 2008, 6:20am UTC](https://www.ruby-forum.com/t/how-to-create-gem/126193/1 "2008-01-16T06:20:18Z")

</div>

hi friends,  
i need help on creating a gem. Am following the Dr. Nic tutorial  
“[http://drnicwilliams.com/2006/10/11/generating-new-gems/#newgem\_remote](http://drnicwilliams.com/2006/10/11/generating-new-gems/#newgem_remote)”

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’

please tell me where iam going wrong!!!

---

<div class="post-metadata">

**Author:** ![teena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/9fc29f/32.png) [@teena](https://www.ruby-forum.com/u/teena)\
**Post date:** [May 30, 2009, 8:12am UTC](https://www.ruby-forum.com/t/how-to-create-gem/126193/2 "2009-05-30T08:12:06Z")

</div>

Hi,  
you can visit on the bellow link

> **[Creating New Gem in Ruby on Rails](http://hiteshrawal.blogspot.com/2009/02/creating-new-gem-in-ruby-on-rails.html)**
>
> In the Past I have created gem for my plugin. Now I am sharing my approach that I have used to do it. Finally I feel how easy it is. ...

here you find all the steps which is required for creating gem.

On Jan 16 2008, 10:20 am, Teena Khedkar \<rails-mailing-l…@andreas-
