Forum: Ruby DLL load path

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Victor S. (Guest)
on 2006-06-07 03:51
(Received via mailing list)
Hi all.

The strange question: I need modify path, where .dll's would be looked
for
(from ruby script).

For ex.

require 'raspell' #bang! 'aspell.dll could'nt be found

I need something like

setenv('PATH', getenv('PATH') + '<my custom folder>')

but also I want PATH system variable not be changed after my script is
stopped...

I think question is dumb, but really don't know, where to look for
answer.
And again, sorry for my poor English.

Thanks.

Victor.
Logan C. (Guest)
on 2006-06-07 04:00
(Received via mailing list)
On Jun 6, 2006, at 7:50 PM, Victor S. wrote:

> I need something like
> Thanks.
>
> Victor.
>
>

$LOAD_PATH << <my custom folder>
require 'raspell'
Dave B. (Guest)
on 2006-06-07 04:00
(Received via mailing list)
Victor S. wrote:
> I need something like
>
> setenv('PATH', getenv('PATH') + '<my custom folder>')

ENV['PATH'] += ";C:\\my\\custom\\folder"

> but also I want PATH system variable not be changed after my script is
> stopped...

Don't worry about it, Ruby will clean up after itself.

Cheers,
Dave
Victor S. (Guest)
on 2006-06-07 04:07
(Received via mailing list)
From: Logan C. [mailto:removed_email_address@domain.invalid]
Sent: Wednesday, June 07, 2006 2:57 AM
> > require 'raspell' #bang! 'aspell.dll could'nt be found
> > And again, sorry for my poor English.
> >
> > Thanks.
> >
> > Victor.
> >
> >
>
> $LOAD_PATH << <my custom folder>
> require 'raspell'

Hmmm... I think it would only affect Ruby modules, not Windows dll's

My example was not clear. It meant:

require 'raspell' => load raspell.so (ruby module), which would try to
load
aspell.dll (plain C dll). And it would look for aspell.dll only in
<current
path> and system PATH, not ruby's $LOAD_PATH, IMO.

V.
Victor S. (Guest)
on 2006-06-07 04:10
(Received via mailing list)
From: removed_email_address@domain.invalid 
[mailto:removed_email_address@domain.invalid] On Behalf Of Dave
Burt
Sent: Wednesday, June 07, 2006 2:58 AM
> Don't worry about it, Ruby will clean up after itself.
Thanks, Dave! It's just what I've need.
BTW, I must do RTFM :)

> Dave

V.
This topic is locked and can not be replied to.