[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

DLL not found

DaZoner

11/24/2004 5:22:00 PM


I'm deploying a Ruby app on Windows that has a number of C extensions that
call a DLL. I've written an install program that copies all necessary files
(Program.rb) to a directory (C:\Directory).

If I run Program from within C:\Directory everything works fine. If I run it
via full pathname from a different directory the DLL is not found. I can get
it to work if I make C:\Directory part of my path but I want to avoid this
if possible. I've tried adding C:\Program to $: but this doesn't do it. What
programmatic steps can I take to get the DLL to be found?


3 Answers

Curt Hibbs

11/24/2004 6:02:00 PM

0

DaZoner wrote:
>
> I'm deploying a Ruby app on Windows that has a number of C
> extensions that
> call a DLL. I've written an install program that copies all
> necessary files
> (Program.rb) to a directory (C:\Directory).
>
> If I run Program from within C:\Directory everything works fine.
> If I run it
> via full pathname from a different directory the DLL is not
> found. I can get
> it to work if I make C:\Directory part of my path but I want to
> avoid this
> if possible. I've tried adding C:\Program to $: but this doesn't
> do it. What
> programmatic steps can I take to get the DLL to be found?

The DLL needs to be either somewhere in your path, or in the same directory
from which the running EXE was loaded (in this case, that would be
ruby.exe).

Curt



Wayne Vucenic

11/24/2004 7:26:00 PM

0

You could copy the DLL to the Windows directory (typically c:\windows)
or the System directory (typically C:\Windows\System).

Wayne


On Thu, 25 Nov 2004 02:48:04 +0900, DaZoner <bugmenot@world.com> wrote:
>
> I'm deploying a Ruby app on Windows that has a number of C extensions that
> call a DLL. I've written an install program that copies all necessary files
> (Program.rb) to a directory (C:\Directory).
>
> If I run Program from within C:\Directory everything works fine. If I run it
> via full pathname from a different directory the DLL is not found. I can get
> it to work if I make C:\Directory part of my path but I want to avoid this
> if possible. I've tried adding C:\Program to $: but this doesn't do it. What
> programmatic steps can I take to get the DLL to be found?
>
>


Zach Dennis

11/24/2004 8:57:00 PM

0

Wayne Vucenic wrote:

> You could copy the DLL to the Windows directory (typically c:\windows)
> or the System directory (typically C:\Windows\System).

Wouldn't you want to make that "c:/windows/" or "c:\\windows\\" becuase
'\' is treat sthe next character as a literal.


>>
>>If I run Program from within C:\Directory everything works fine. If I run it
>>via full pathname from a different directory the DLL is not found. I can get
>>it to work if I make C:\Directory part of my path but I want to avoid this
>>if possible. I've tried adding C:\Program to $: but this doesn't do it. What
>>programmatic steps can I take to get the DLL to be found?
>>

Have you tried "c:\\Program" or "c:/Program"

Zach