Gem question: "win32" vs. "ruby"

Discussion in 'Ruby' started by Jeff, Nov 29, 2006.

  1. Jeff

    Jeff Guest

    Often when I install a new gem, or try to update a gem I already have,
    I'll be presented with a list of choices for which version I want to
    install.

    And often I see two entries with the same version number, but one will
    say "(win32)" after it, and the other will say "(ruby)". I assume if
    I'm on WinXP, I should choose the win32 version - but why? What's the
    difference?

    And so if there is *not* a win32 version, is it ok to install the
    "ruby" version on a Windows system? For example, the latest Mongrel
    gem (0.3.13.4) does not have a win32 equivalent.

    Thanks
    Jeff
     
    Jeff, Nov 29, 2006
    #1
    1. Advertising

  2. Jeff

    Jan Svitok Guest

    On 11/29/06, Jeff <> wrote:
    > Often when I install a new gem, or try to update a gem I already have,
    > I'll be presented with a list of choices for which version I want to
    > install.
    >
    > And often I see two entries with the same version number, but one will
    > say "(win32)" after it, and the other will say "(ruby)". I assume if
    > I'm on WinXP, I should choose the win32 version - but why? What's the
    > difference?
    >
    > And so if there is *not* a win32 version, is it ok to install the
    > "ruby" version on a Windows system? For example, the latest Mongrel
    > gem (0.3.13.4) does not have a win32 equivalent.
    >
    > Thanks
    > Jeff


    Hi,

    the difference is when the gem contains compiled extension. On other
    platforms, it is assumed that you have a compiler installed by
    default, so gem can compile the extension without problems. On
    windows, no compiler is installed normally. To work around that,
    -win32 gems contain precompiled extension.

    You can use the not-precompiled gem provided you have the compiler
    installed (best and most safe one is the one that was used to compile
    ruby itself, in the case of one click it is VC6) and you have set up
    the compile environment vars (i.e. run vcvars32 before running gem
    install).

    In the case of mongrel, I'm not sure if 0.3.13.4 works on windows. To
    check see mongrel-users mailing list archive on rubyforge. There is a
    newer version in works that is almost done, but they are finishing the
    win32 part (it's like 0.3.18 or 0.3.19). You can fetch it from
    'prereleases' repository, gem install mongrel --source
    http://mongrel.rubyforge.org/releases, but read the mailing list
    archive before you do. 0.3.13 is the latest stable for win32.
     
    Jan Svitok, Nov 29, 2006
    #2
    1. Advertising

  3. Jeff

    Jeff Guest

    Jan Svitok wrote:
    > the difference is when the gem contains compiled extension. On other
    > platforms, it is assumed that you have a compiler installed by
    > default, so gem can compile the extension without problems. On
    > windows, no compiler is installed normally. To work around that,
    > -win32 gems contain precompiled extension.
    >


    Awesome... thanks Jan, that makes total sense now.

    Jeff
     
    Jeff, Nov 29, 2006
    #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. gga
    Replies:
    0
    Views:
    140
  2. Clifford Heath
    Replies:
    7
    Views:
    310
    Shanti Braford
    Jun 9, 2006
  3. Austin 7873
    Replies:
    5
    Views:
    191
    Eric Hodel
    Jan 27, 2007
  4. Iñaki Baz Castillo
    Replies:
    1
    Views:
    159
    Iñaki Baz Castillo
    Feb 28, 2011
  5. Michael Edmonson

    Win32::SAPI4 question (Win32 events and Perl)

    Michael Edmonson, Feb 28, 2004, in forum: Perl Misc
    Replies:
    0
    Views:
    183
    Michael Edmonson
    Feb 28, 2004
Loading...

Share This Page