# Rubygems and manually installed dependencies

**URL:** https://rubytalk.org/t/rubygems-and-manually-installed-dependencies/20831
**Category:** ruby-talk
**Created:** [14 September 2005 18:56 UTC](https://rubytalk.org/t/rubygems-and-manually-installed-dependencies/20831 "2005-09-14T18:56:33Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![7rans](https://avatars.discourse-cdn.com/v4/letter/7/a8b319/32.png) [@7rans](https://rubytalk.org/u/7rans)
#### Post date: [14 September 2005 18:56 UTC](https://rubytalk.org/t/rubygems-and-manually-installed-dependencies/20831/1 "2005-09-14T18:56:33Z")

</div>

please correct me if i am mistaken. if i'm using a gems installrf app  
that has gem dependencies, rubygems will prevent it from working unless  
those other gems are installed? even if those other apps are install  
manually?

thanks,  
t.

---

<div class="post-metadata">

### Author: ![Jim\_Weirich1](https://avatars.discourse-cdn.com/v4/letter/j/73ab20/32.png) [@Jim\_Weirich1](https://rubytalk.org/u/Jim_Weirich1)
#### Post date: [14 September 2005 19:24 UTC](https://rubytalk.org/t/rubygems-and-manually-installed-dependencies/20831/2 "2005-09-14T19:24:40Z")

</div>

Trans said:

> please correct me if i am mistaken. if i'm using a gems installrf app  
> that has gem dependencies, rubygems will prevent it from working unless  
> those other gems are installed? even if those other apps are install  
> manually?

Just to be clear ... there are two kinds of dependencies.

There are the declared dependencies in the gem metadata that are used to  
identify additional gems that might be needed at install time. A --force  
flag on the gem command will override these declared dependencies and  
allow you to install even if the other gems are not available.

The other kind of dependency is a require\_gem statement in the runtime  
code. If a require\_gem statement cannot find a gem that matches the name  
and requested version constraint, then an exception will be generated.

However, most applications should \*not\* be using require\_gem, even if they  
are installed by gems. You should use require\_gem \_only\_ if you wish to  
require a particular version of a library.

> **···**
>
> --  
> -- Jim Weirich jim@weirichhouse.org [http://onestepback.org](http://onestepback.org)  
> -----------------------------------------------------------------  
> "Beware of bugs in the above code; I have only proved it correct,  
> not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)

---

<div class="post-metadata">

### Author: ![7rans](https://avatars.discourse-cdn.com/v4/letter/7/a8b319/32.png) [@7rans](https://rubytalk.org/u/7rans)
#### Post date: [14 September 2005 19:56 UTC](https://rubytalk.org/t/rubygems-and-manually-installed-dependencies/20831/3 "2005-09-14T19:56:35Z")

</div>

Thanks Jim,

That's what I thought. But when I was trying to run Nitro, rubygems  
reported that nano/mega wasn't installed. But they were manually  
installed. When I installed the gems the errors went away. So then I  
egrep the nitro gem dir and there is no 'require\_gem'. In fact I  
egrepped my enitre gems dir and only Rake has two uses of require\_gem.

So I don't understand.

T.
