# RAA, gems, and RubyForge (was Re: User Account Setup - Multi

**URL:** <https://www.ruby-forum.com/t/raa-gems-and-rubyforge-was-re-user-account-setup-multi/95165>\
**Category:** Ruby\
**Created:** [May 23, 2006, 5:21pm UTC](https://www.ruby-forum.com/t/raa-gems-and-rubyforge-was-re-user-account-setup-multi/95165 "2006-05-23T17:21:48Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![softf5ajivanet](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/9f8e36/32.png) [@softf5ajivanet](https://www.ruby-forum.com/u/softf5ajivanet)\
**Post date:** [May 23, 2006, 5:21pm UTC](https://www.ruby-forum.com/t/raa-gems-and-rubyforge-was-re-user-account-setup-multi/95165/1 "2006-05-23T17:21:48Z")

</div>

On 5/23/06, Paul D. Kraus [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> On 5/23/06, Joey [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > Umm, maybe [http://raa.ruby-lang.org/](http://raa.ruby-lang.org/)  
> > [snip]
> 
> [snip]
> 
> Oh and the biggest one… What the heck is GEM.

1. Is there a central repository of gems somewhere? That is, when you  
run “gem install -r …”, where does it get the gems from?

2. Rubyforge seems to have some non-obvious links that lead to lists  
of gems… (see [http://gems.rubyforge.org/](http://gems.rubyforge.org/)) Is there a connection  
between the RAA and Rubyforge?

3. With the current RubyGems 0.8.11, should we do

require ‘rubygems’  
require\_gem ‘foo’

or

require ‘rubygems’  
require ‘foo’

?

1. For users (both devs creating gems, and folks installing and using  
them), what’s expected to change when RubyGems 0.9.0 gets released?  
“require\_gem”?

---

<div class="post-metadata">

**Author:** ![softf5ajivanet](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/9f8e36/32.png) [@softf5ajivanet](https://www.ruby-forum.com/u/softf5ajivanet)\
**Post date:** [May 23, 2006, 5:24pm UTC](https://www.ruby-forum.com/t/raa-gems-and-rubyforge-was-re-user-account-setup-multi/95165/2 "2006-05-23T17:24:59Z")

</div>

On 5/23/06, John G. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> 1. Is there a central repository of gems somewhere? That is, when you  
> run “gem install -r …”, where does it get the gems from?

RubyForge or RubyForge mirrors.

> 1. Rubyforge seems to have some non-obvious links that lead to lists  
> of gems… (see [http://gems.rubyforge.org/](http://gems.rubyforge.org/)) Is there a connection  
> between the RAA and Rubyforge?

Not between RAA and RubyForge.

> 1. With the current RubyGems 0.8.11, should we do
> 
> require ‘rubygems’  
> require\_gem ‘foo’
> 
> or
> 
> require ‘rubygems’  
> require ‘foo’

Never use require\_gem unless you need to fix a gem version. Avoid  
using it anyway, if you can.

> 1. For users (both devs creating gems, and folks installing and using  
> them), what’s expected to change when RubyGems 0.9.0 gets released?  
> “require\_gem”?

Several things. Hopefully, an activate\_gem command will be added.

-austin

---

<div class="post-metadata">

**Author:** ![softf5ajivanet](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/9f8e36/32.png) [@softf5ajivanet](https://www.ruby-forum.com/u/softf5ajivanet)\
**Post date:** [May 23, 2006, 5:59pm UTC](https://www.ruby-forum.com/t/raa-gems-and-rubyforge-was-re-user-account-setup-multi/95165/3 "2006-05-23T17:59:46Z")

</div>

On 5/23/06, Austin Z. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> On 5/23/06, John G. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > 1. Is there a central repository of gems somewhere? That is, when you  
> > run “gem install -r …”, where does it get the gems from?
> 
> RubyForge or RubyForge mirrors.

Thanks. After looking at the RubyGems user guide chapter 8  
(“distributing gems” [http://docs.rubygems.org/read/chapter/6](http://docs.rubygems.org/read/chapter/6)), I see  
that RubyForge “will automatically deploy any .gem file you upload to  
a project download area.”. That sounds like a nice system.

Also, on [http://rubyforge.org/docman/?group\_id=5](http://rubyforge.org/docman/?group_id=5) , the  
“mirror\_setup.html” link describes some more too.

---

<div class="post-metadata">

**Author:** ![softf5ajivanet](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/9f8e36/32.png) [@softf5ajivanet](https://www.ruby-forum.com/u/softf5ajivanet)\
**Post date:** [May 24, 2006, 5:16pm UTC](https://www.ruby-forum.com/t/raa-gems-and-rubyforge-was-re-user-account-setup-multi/95165/4 "2006-05-24T17:16:04Z")

</div>

Jim W. wrote:

> (3) Support for supplying static configuration data with an installed  
> gem, and mechanisms for getting that data. This will make it easier for  
> developers to repackage a gem as an alternative OS specific package  
> (e.g. RPMs and Debian packages).

I don’t think you’re implying this, but I just wanted to clarify: Does  
this mean that gem authors can package configuration files for  
applications now? (More likely meaning: “gem authors can now specify  
_gem_ configuration”)

Patiently Awaiting Ability to Gem Up Diakonos;  
Pistos

---

<div class="post-metadata">

**Author:** ![softf5ajivanet](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/9f8e36/32.png) [@softf5ajivanet](https://www.ruby-forum.com/u/softf5ajivanet)\
**Post date:** [May 27, 2006, 1:12am UTC](https://www.ruby-forum.com/t/raa-gems-and-rubyforge-was-re-user-account-setup-multi/95165/5 "2006-05-27T01:12:05Z")

</div>

On 5/23/06, Austin Z. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Never use require\_gem unless you need to fix a gem version.  
> Avoid using it anyway, if you can.

Hmm. I seem to remember needing to use require\_gem  
in some situation. I started with require rubygems + require  
the\_gem\_I\_needed, because I was copying those lines  
from some other example. But that didn’t work until I  
changed the second “require” to “require\_gem”…

---

<div class="post-metadata">

**Author:** ![softf5ajivanet](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/9f8e36/32.png) [@softf5ajivanet](https://www.ruby-forum.com/u/softf5ajivanet)\
**Post date:** [May 23, 2006, 7:09pm UTC](https://www.ruby-forum.com/t/raa-gems-and-rubyforge-was-re-user-account-setup-multi/95165/6 "2006-05-23T19:09:44Z")

</div>

Others have given good answers. I’ll just make a few additions …

John G. wrote:

> 1. Is there a central repository of gems somewhere? That is, when you  
> run “gem install -r …”, where does it get the gems from?

As others have mentioned, the gems are supplied from RubyForge. In  
addition, you can select an althernative source by using the --source  
option. I often put beta versions of my software on my own site and  
people can grab it with:

gem install rake --source [http://onestepback.org/betagems](http://onestepback.org/betagems)

It’s easy to create and maintain an alternative gem server.

> 1. With the current RubyGems 0.8.11, should we do
> 
> require ‘rubygems’  
> require\_gem ‘foo’
> 
> or
> 
> require ‘rubygems’  
> require ‘foo’

Always use the second unless you need a particular version of a gem.

I recommend NEVER putting a require\_gem in your normal library code  
(mainly because you don’t want to have version dependencies scattered  
throughout your code base). Version dependencies should be gathered  
into a single location and made configurable by the end user (e.g.  
something similar to what Rails does with its environment file).

The next version of RubyGems will have a simple “gem” directive that is  
similar to what require\_gem does now, but with less surprizing  
semantics. But the recommendation in the above paragraph will still  
apply.

> 1. For users (both devs creating gems, and folks installing and using  
> them), what’s expected to change when RubyGems 0.9.0 gets released?  
> “require\_gem”?

The next version of RubyGems will have:

(1) Incremental downloads of the RubyForge index. You will only need to  
download the entire thing if you are too far out of date.

(2) Support for the new “gem” directive (“require\_gem” will still work,  
we just won’t recommend it anymore).

(3) Support for supplying static configuration data with an installed  
gem, and mechanisms for getting that data. This will make it easier for  
developers to repackage a gem as an alternative OS specific package  
(e.g. RPMs and Debian packages).

(1) and (2) are done and ready to go. We are still ironing out some  
details on (3).

Looking even farther out, we intend to unify the way RubyGems treats  
local and remote gems (for example, installing a local gem does not  
check dependencies). We will also support resolving dependencies across  
different servers.

Thanks for asking.

–  
– Jim W.

---

<div class="post-metadata">

**Author:** ![softf5ajivanet](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/9f8e36/32.png) [@softf5ajivanet](https://www.ruby-forum.com/u/softf5ajivanet)\
**Post date:** [May 27, 2006, 1:18am UTC](https://www.ruby-forum.com/t/raa-gems-and-rubyforge-was-re-user-account-setup-multi/95165/7 "2006-05-27T01:18:47Z")

</div>

On 5/26/06, Garance A Drosehn [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > > require ‘foo’
> > 
> > Never use require\_gem unless you need to fix a gem version.  
> > Avoid using it anyway, if you can.
> 
> Hmm. I seem to remember needing to use require\_gem  
> in some situation. I started with require rubygems + require  
> the\_gem\_I\_needed, because I was copying those lines  
> from some other example. But that didn’t work until I  
> changed the second “require” to “require\_gem”…

I’ve had to use it when I didn’t have time to figure out what the  
actual rb file name was for a gem.  
An example of this is:  
require\_gem “rubyzip” # Works.  
require “rubyzip” # Blows up  
require “zip/zip” # Works, once you know it exists.

---

<div class="post-metadata">

**Author:** ![softf5ajivanet](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/9f8e36/32.png) [@softf5ajivanet](https://www.ruby-forum.com/u/softf5ajivanet)\
**Post date:** [May 27, 2006, 3:49pm UTC](https://www.ruby-forum.com/t/raa-gems-and-rubyforge-was-re-user-account-setup-multi/95165/8 "2006-05-27T15:49:47Z")

</div>

On 5/26/06, Wilson B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > > > require ‘rubygems’  
> > > > actual rb file name was for a gem.  
> > > > This uses behaviour that is being deprecated. I would suspect that by  
> > > > time RubyGems 1.0 is released, require\_gem (if it even exists for  
> > > > backward compatibility) will ignore autorequire because all gems at that  
> > > > point should no longer be using the autorequire functionality.

#require\_gem should be used sparingly, and then only to fix a specific  
version until the next release of Rubygems when #gem will be introduced  
to do the same.

> An example of this is:  
> require\_gem “rubyzip” # Works.  
> require “rubyzip” # Blows up  
> require “zip/zip” # Works, once you know it exists.

Your first line will not work with any of the recent gems that I have  
released, nor any of the ones that I expect to release in the future.  
Even if you do “require\_gem ‘mime-types’”, you will still need to do  
“require ‘mime/types’” afterwards.

This would be something that should encourage better documentation of  
gems.

-austin
