[Rubygems-developers] Using own stub code
chad at chadfowler.com
Fri Jun 4 07:32:18 EDT 2004
On 3/6/2004, at 7:42 PM, Michael Neumann wrote:
> On Thu, Jun 03, 2004 at 06:41:01PM -0400, Chad Fowler wrote:
>> On 3/6/2004, at 9:29 AM, Michael Neumann wrote:
>>> 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
>>> 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
>>> 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
> No that does not work. A DBD/Pg/Pg stub is installed with
> given. But the Pg.rb file is not loaded:
> require 'dbi'
> require_gem 'dbd-pg'
> Both lines return true. But I've inserted a print statement into Pg.rb,
> and it is not executed! Strange.
Could you possibly tar up your working directory with gemspec and put
it somewhere I could get it? I'd like to take a look for myself.
More information about the Rubygems-developers