[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 22:21:48 EDT 2007


Yes they should go in the lib dir if I was not using Windows. Windows
searches for DLLs only in the system folder, in the applications
directory (ruby.exe) and in the location specified in the PATH
variable.

If you have a look at files in the Ruby One Click Installer for
Windows you'll notice that all DLL required by preinstalled modules
(gdbm.dll, iconv.dll, libeay32.dll, zlib1.dll, ...) are placed in the
bin directory. They are not executable but if you don't place them
along the ruby.exe file the OS will not find them and you'll end-up
with a load error.

I know my question is very Windows centric, because with other OS you
would never put libraries in the same folder as executables files.

Placing DLLs in the bin folder is probably not "state of the art" but
it would allow shipping binary win32 gems that contains all the
required dependencies and don't require additional application or
libraries installation. So I was just wondering if it was available in
gemspec.

Cheers,

Olivier.



On 3/19/07, Eric Hodel <drbrain at segment7.net> wrote:
> On Mar 19, 2007, at 13:38, Olivier Boudry wrote:
> > On 3/19/07, Eric Hodel <drbrain at segment7.net> wrote:
> >> On Mar 19, 2007, at 07:58, Olivier Boudry wrote:
> >>> 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.
> >>
> >> How do you run a shared library?
> >
> > I don't run them, but putting them as executables in the gemspec was
> > the only way I found to get them installed in the ruby\bin directory.
> > Also I know this is not the purpose of the executables parameter.
>
> So if you don't run them why are they in the bin dir?  Why aren't
> they in the lib dir?
>
> _______________________________________________
> Rubygems-developers mailing list
> Rubygems-developers at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rubygems-developers
>


More information about the Rubygems-developers mailing list