# Problem with path

**URL:** <https://www.ruby-forum.com/t/problem-with-path/168960>\
**Category:** Ruby\
**Created:** [May 27, 2009, 6:58pm UTC](https://www.ruby-forum.com/t/problem-with-path/168960 "2009-05-27T18:58:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cheyne](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/b9bd4f/32.png) [@cheyne](https://www.ruby-forum.com/u/cheyne)\
**Post date:** [May 27, 2009, 6:58pm UTC](https://www.ruby-forum.com/t/problem-with-path/168960/1 "2009-05-27T18:58:49Z")

</div>

Hey there,

i tried to include libs in my ruby file, just as ruby cookbook shows,

require ‘rubygems’  
request ‘win32/service’  
include Win32

after run, it shows error msg, ‘require’ no such file to load -  
win32/service

I check the lib folder, service.rb is not under the regular lib path,  
which is C:\Ruby\lib\ruby\1.8.

I found service.rb in  
C:\Ruby\lib\ruby\gems\1.8\gems\windows-pr-0.9.3\lib\windows and in the  
file, it requires “windows/api”, which i can only find it in  
C:\Ruby\lib\ruby\gems\1.8\gems\windows-api-0.2.4\lib\windows.

So, I don’t know how to make the file work since the required files are  
all over the places.

---

<div class="post-metadata">

**Author:** ![cheyne](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/b9bd4f/32.png) [@cheyne](https://www.ruby-forum.com/u/cheyne)\
**Post date:** [May 27, 2009, 10:39pm UTC](https://www.ruby-forum.com/t/problem-with-path/168960/2 "2009-05-27T22:39:28Z")

</div>

Seems it should be

require ‘windows/service’

---

<div class="post-metadata">

**Author:** ![cheyne](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/b9bd4f/32.png) [@cheyne](https://www.ruby-forum.com/u/cheyne)\
**Post date:** [May 28, 2009, 1:58am UTC](https://www.ruby-forum.com/t/problem-with-path/168960/3 "2009-05-28T01:58:30Z")

</div>

Alex 2k8 wrote:

> Seems it should be
> 
> require ‘windows/service’

No, I reinstalled the lib by keying command line gem install  
win32-service-0.6.1-x86-mswin32-60.gem. It was sucessfully installed.

I checked the lib path, it is  
“C:\ruby\lib\ruby\gems\1.8\gems\win32-service-0.6.1-x86-mswin32-60\lib\win32”…

---

<div class="post-metadata">

**Author:** ![cheyne](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/b9bd4f/32.png) [@cheyne](https://www.ruby-forum.com/u/cheyne)\
**Post date:** [May 28, 2009, 12:23pm UTC](https://www.ruby-forum.com/t/problem-with-path/168960/4 "2009-05-28T12:23:04Z")

</div>

Cheyne Li wrote:

> No, I reinstalled the lib by keying command line gem install  
> win32-service-0.6.1-x86-mswin32-60.gem. It was sucessfully installed.
> 
> I checked the lib path, it is  
> “C:\ruby\lib\ruby\gems\1.8\gems\win32-service-0.6.1-x86-mswin32-60\lib\win32”…

This will work  
require ‘win32/service’

Basically, you have  
‘lib\win32\service.rb’  
‘lib\win32\daemon.so’

so you can use  
require ‘win32/service’  
require ‘win32/daemon’
