Problem with path

Discussion in 'Ruby' started by Cheyne Li, May 27, 2009.

  1. Cheyne Li

    Cheyne Li Guest

    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.
    --
    Posted via http://www.ruby-forum.com/.
    Cheyne Li, May 27, 2009
    #1
    1. Advertising

  2. Cheyne Li

    Cheyne Li Guest

    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"...
    --
    Posted via http://www.ruby-forum.com/.
    Cheyne Li, May 28, 2009
    #2
    1. Advertising

  3. Cheyne Li

    Alex 2k8 Guest

    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'
    --
    Posted via http://www.ruby-forum.com/.
    Alex 2k8, May 28, 2009
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Keith-Earl
    Replies:
    1
    Views:
    1,968
    Peter O'Reilly
    May 3, 2004
  2. Replies:
    0
    Views:
    2,244
  3. Mupota Muchelemba
    Replies:
    1
    Views:
    906
    Tony Morris
    Feb 4, 2004
  4. Replies:
    3
    Views:
    398
  5. R. Sherwin Kartick

    embedded perl path $ENV{PATH} problem

    R. Sherwin Kartick, Sep 22, 2004, in forum: Perl Misc
    Replies:
    0
    Views:
    186
    R. Sherwin Kartick
    Sep 22, 2004
Loading...

Share This Page