[Rubygems-developers] Using own stub code
Chad Fowler
chad at chadfowler.com
Thu Jun 3 18:41:01 EDT 2004
On 3/6/2004, at 9:29 AM, Michael Neumann wrote:
> Hi,
>
> I encountered a problem during gemifying a DBD (Database Driver).
> They are required to be installed into e.g. site_ruby/1.8/DBD/Pg for
> the
> Pg (Postgres) DBD. Maybe, I should build versioning into DBI, so that I
> can write:
>
> DBI.connect("dbi:Pg(0.1.0):db", ...)
>
> and this would
>
> require_gem 'dbd-pg', '0.1.0'
>
> Or could I tell rubygems to install a stub as DBD/Pg/Pg.rb? Inside the
> gemspec? That would be much easier.
You should be able to have it do this if you specify DBD/Pg/Pg.rb as
the autorequire file. Then you need to --install-stub during
installation of the dependencies. We need to sort this whole thing
out. The "purist" approach (from a RubyGems perspective) would be to
modify DBI to require_gem, but I know that won't be preferable to many
people (unless RubyGems is included with Ruby).
>
Looking forward to seeing all of those new Gems!
Thanks,
Chad
More information about the Rubygems-developers
mailing list