[Rubygems-developers] Specifying where to install the stub file

Michael Neumann mneumann at ntecs.de
Tue Jul 13 08:15:40 EDT 2004

Jim Weirich wrote:
> Chad Fowler said:
>>On Mon, 12 Jul 2004, Michael Neumann wrote:
>># Now I'd like to install the stub not as 'Pg.rb' but as 'DBD/Pg/Pg.rb'.
>># Is there a way to do this?
>>Right now the only way I know of to do this is for your gem to actually
>>contain the file with path DBD/Pg/Pg.rb and for your autorequire to be
>>Since Pg would be your autorequire, the end user wouldn't actually have to
>>ever require 'DBD/Pg/Pg' in this case.
>>Does that make sense?
> I'm not sure that will help Michael's situation.
> The end user never explicitly requires the database driver (eg. Pg.rb). 
> The DBI software will load it based on the connection string given to the
> DBI connection method (e.g.  "DBI:Pg:databasename" tells DBI to find and
> load the Pg database driver).
> Michael, how do you feel about adding some gem specific logic to DBI?  It
> can be done is such a way that if rubygems is not available, then the
> logic never triggers; but if rubygems is available, then we can search the
> gem-space as well.-

But then DBDs installed by rubygems and those installed via an 
install.rb script cannot coexist easily, and I have to release both the 
gems-version and one that can be installed via install.rb. Not sure 
whether it's worth.

> I'm not generally in favor of embedding gem-specific behavior in general
> purpose code, but software that explicitly searches the load path interact
> in interesting ways with rubygem's approach to managing the loadpath.
> I'd be glad to help with any gem-specific code.  What are your thoughts?

I am not sure if I should completely switch over to use rubygems for DBI 
or if it's to early for that. But if there is a clean way, I am glad to 
add it to the DBI.



More information about the Rubygems-developers mailing list