Ruby in windows

Discussion in 'Ruby' started by lance.sanchez@gmail.com, Mar 2, 2008.

  1. Guest

    i'm trying to script administrative tasks in windows and i'm really
    not feeling the ruby love, does anyone have some suggestions on a way
    of running commands and catching STDERR in windows?
     
    , Mar 2, 2008
    #1
    1. Advertising

  2. Jano Svitok Guest

    On Sun, Mar 2, 2008 at 7:24 AM,
    <> wrote:
    > i'm trying to script administrative tasks in windows and i'm really
    > not feeling the ruby love, does anyone have some suggestions on a way
    > of running commands and catching STDERR in windows?


    Try:
    1. win32-open3 gem
    2. use Kernel#system or `` (backticks) and redirect output to a file
    or pipe. Windows from 2000 up supports stderr
    redirection ( command 2> err.txt )
     
    Jano Svitok, Mar 2, 2008
    #2
    1. Advertising

  3. Guest

    thanks, thats giving me the io objects back.

    On Mar 2, 1:49=A0am, "Jano Svitok" <> wrote:
    > On Sun, Mar 2, 2008 at 7:24 AM,
    >
    > <> wrote:
    > > i'm trying to script administrative tasks in windows and i'm really
    > > =A0not feeling the ruby love, does anyone have some suggestions on a way=


    > > =A0of running commands and catching STDERR in windows?

    >
    > Try:
    > 1. win32-open3 gem
    > 2. use Kernel#system or `` (backticks) and redirect output to a file
    > or pipe. Windows from 2000 up supports stderr
    > redirection ( command 2> err.txt )
     
    , Mar 2, 2008
    #3
  4. when i run this in production it seems to die while trying to read
    from the Output IO object, if its

    io_in, io_out, io_err = Open3.popen('some command with parameters')

    out = io_out.read (hangs here forever if the command should have worked)

    On Sun, Mar 2, 2008 at 10:11 AM,
    <> wrote:
    > thanks, thats giving me the io objects back.
    >
    > On Mar 2, 1:49 am, "Jano Svitok" <> wrote:
    > > On Sun, Mar 2, 2008 at 7:24 AM,

    >
    >
    > >
    > > <> wrote:
    > > > i'm trying to script administrative tasks in windows and i'm really
    > > > not feeling the ruby love, does anyone have some suggestions on a way
    > > > of running commands and catching STDERR in windows?

    > >
    > > Try:
    > > 1. win32-open3 gem
    > > 2. use Kernel#system or `` (backticks) and redirect output to a file
    > > or pipe. Windows from 2000 up supports stderr
    > > redirection ( command 2> err.txt )

    >
    >
     
    Lance Sanchez, Mar 3, 2008
    #4
    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. Szymon Drejewicz

    PostgreSQL, Ruby, FX Ruby and Windows XP

    Szymon Drejewicz, Sep 19, 2003, in forum: Ruby
    Replies:
    2
    Views:
    115
    Szymon Drejewicz
    Sep 19, 2003
  2. Useko Netsumi

    mysql-ruby for ruby 1.8.1 on windows ...

    Useko Netsumi, Jan 7, 2004, in forum: Ruby
    Replies:
    7
    Views:
    196
    Tim Sutherland
    Jan 10, 2004
  3. Curt Hibbs
    Replies:
    54
    Views:
    518
    Curt Hibbs
    Aug 5, 2004
  4. cjl
    Replies:
    8
    Views:
    129
    Shashank Date
    Mar 20, 2005
  5. anne001
    Replies:
    1
    Views:
    478
Loading...

Share This Page