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

Chad Fowler chad at chadfowler.com
Mon Jul 12 12:59:43 EDT 2004



On Mon, 12 Jul 2004, Michael Neumann wrote:

# Is this possible?
#
# I currently have this directory layout:
#
#   .
#   Pg.rb
#
# Inside the gemspec, I have:
#
#   s.require_path = '.'
#   s.autorequire = 'Pg'
#
# 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
'DBD/Pg/Pg'.

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?

Chad


More information about the Rubygems-developers mailing list