# Hoe and gems: How to handle deps?

**URL:** <https://www.ruby-forum.com/t/hoe-and-gems-how-to-handle-deps/103892>\
**Category:** Ruby\
**Created:** [May 11, 2007, 11:43am UTC](https://www.ruby-forum.com/t/hoe-and-gems-how-to-handle-deps/103892 "2007-05-11T11:43:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vassilis\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/848f3c/32.png) [@Vassilis\_R](https://www.ruby-forum.com/u/Vassilis_R)\
**Post date:** [May 11, 2007, 11:43am UTC](https://www.ruby-forum.com/t/hoe-and-gems-how-to-handle-deps/103892/1 "2007-05-11T11:43:59Z")

</div>

I got into using Hoe, my projects were starting to get ou t of control  
and Hoe helps a lot in keeping everything at a sane level.  
I just need a final bit of help with figuring out how to build the  
various gems.

Q1: Why does Hoe add itself as a dependency to the gem and how can I  
remove it?

Q2: How to I add gem dependencies in a gem defined with Hoe?

And a couple of comment about the handling of README and the default  
Rakefile:  
Calculation of the paragraphs seems to be off by 1, so everything ends  
up in the wrong place.  
This is not actually very serious, it’s only that the fiels generated by  
sow just don’t exactly fit with what Hoe expects.

Also, it would be nice to strip whitespace from the beginning of a line  
for things like the url of a project.  
(yes, yes, I should my coding where my comments are…I know 🙂 )

Cheers,  
V.-

---

<div class="post-metadata">

**Author:** ![Vassilis\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/848f3c/32.png) [@Vassilis\_R](https://www.ruby-forum.com/u/Vassilis_R)\
**Post date:** [May 11, 2007, 6:46pm UTC](https://www.ruby-forum.com/t/hoe-and-gems-how-to-handle-deps/103892/2 "2007-05-11T18:46:54Z")

</div>

On 5/11/07, Vassilis R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I got into using Hoe, my projects were starting to get ou t of control  
> and Hoe helps a lot in keeping everything at a sane level.  
> I just need a final bit of help with figuring out how to build the  
> various gems.
> 
> Q1: Why does Hoe add itself as a dependency to the gem and how can I  
> remove it?

When a user wants to run tests on your package via “gem check -t” then  
Hoe needs to be included as a dependency so your Rakefile is usable by  
gem.

Currently there is no way to remove Hoe as a dependency.

> Q2: How to I add gem dependencies in a gem defined with Hoe?

Hoe.new(‘your\_project’, ‘0.0.0’) do |proj|  
proj.extra\_deps \<\< [‘rubyforge’, ‘\>= 0.3.1’]  
proj.extra\_deps \<\< [‘xx’]  
end

Blessings,  
TwP

---

<div class="post-metadata">

**Author:** ![Vassilis\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/848f3c/32.png) [@Vassilis\_R](https://www.ruby-forum.com/u/Vassilis_R)\
**Post date:** [May 13, 2007, 7:00pm UTC](https://www.ruby-forum.com/t/hoe-and-gems-how-to-handle-deps/103892/3 "2007-05-13T19:00:56Z")

</div>

“Tim P.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) writes:

> When a user wants to run tests on your package via “gem check -t” then  
> Hoe needs to be included as a dependency so your Rakefile is usable by  
> gem.
> 
> Currently there is no way to remove Hoe as a dependency.

hoe.spec.dependencies.delete\_if { |dep| dep.name == “hoe” }

Be careful.
