[Rubygems-developers] Having dynamic libraries installed in the bin directory without having them put in ruby's search path?

Olivier Boudry olivier.boudry at gmail.com
Mon Mar 19 10:58:12 EDT 2007


I'm building the win32 gems for the SAP Rfc connector (a tool to
perform remote function calls on a SAP R/3 system). I would need to
have dll files placed into the ruby\bin directory. I tried to list
them in spec.executables but encountered another problem.

The module name (and main .rb file) is the same as the name of one of
the dll's. As the gem's bin directory is added to ruby's search path
when I try to load the module, ruby tries to load the dll instead of
loading the .rb file. I tried to rename the bin directory using the
spec.bindir variable, but the new folder's name is also added to the
module search path.

Is there a way to have files placed into the bin directory without
them being added to ruby module search path? I'm not sure the module's
author will want to rename his module just to solve this problem. ;-)



More information about the Rubygems-developers mailing list