gem.cmd install RMagick-win32-1.9.2-mswin32.gem: Buffer error

Discussion in 'Ruby' started by Clifford Heath, May 31, 2006.

  1. On Windows XP, under the cygwin "bash":

    $ ruby --version
    ruby 1.8.1 (2004-01-27) [i386-mswin32]

    $ gem.cmd --version
    0.8.11

    $ gem.cmd install RMagick-win32-1.9.2-mswin32.gem
    Attempting local installation of 'RMagick-win32-1.9.2-mswin32.gem'
    ERROR: Error installing gem RMagick-win32-1.9.2-mswin32.gem[.gem]:
    buffer error

    What gives?
    Clifford Heath, May 31, 2006
    #1
    1. Advertising

  2. Tim Hunter wrote:
    > The rmagick-win32 gem is for native Windows.


    Ok, but I'm not using a cygwin Ruby - it's too slow.
    It's a native Win32 Ruby.

    > For Cygwin you use the
    > regular rmagick gem or the RMagick source tarball.


    Tried the source gem, but get different errors building it.
    I'll post those later today if you wish.

    > If you get it to work I'd appreciate it if you'd let me know
    > what you did and what obstacles you had to overcome.


    Will do. Thanks for your help.
    Clifford Heath, May 31, 2006
    #2
    1. Advertising

  3. Tim Hunter wrote:
    > Hmmm...your first post said "under the cygwin 'bash'".


    Yes. I launched the normal Win32 install from within bash.
    The reason I mentioned bash and cygwin is that within bash
    I have to use the explicit "gem.cmd" form, I can't just say
    "gem ...".

    > Did I misunderstand?


    Only at first.

    > If you're actually installing on normal, non-cygwin
    > Windows, then the rmagick-win32 gem is appropriate and we need to
    > address the "buffer error" problem.


    Yes, please.
    Clifford Heath, Jun 1, 2006
    #3
  4. Tim Hunter wrote:
    > See this RMagick forum thread:
    > http://rubyforge.org/forum/forum.php?thread_id=3457&forum_id=33
    > Let me know if this doesn't address your problem.


    That didn't work, but this did (also in package.rb, zipped_stream):

    def zipped_stream(entry)
    # if Zlib::ZLIB_VERSION < '1.2.1'
    # zis = Zlib::GzipReader.new entry
    # dis = zis.read
    # is = StringIO.new(dis)
    # else
    is = Zlib::GzipReader.new entry
    # end
    #ensure
    # zis.finish if zis
    end

    BTW, ruby -e 'require "zlib"; p Zlib::ZLIB_VERSION' says
    "1.1.4"

    Thanks for pointing me in the right direction. Anything else you'd
    like to know to find a definitive fix for this?

    Clifford Heath.
    Clifford Heath, Jun 2, 2006
    #4
  5. Tim Hunter wrote:
    > Glad you're up and running.


    Not quite. After changing "require 'RMagick'" to
    require 'rubygems'
    require_gem 'RMagick-win32'

    (it's a shame that rubygems can't just extend 'require')...
    I get a dialog saying "ruby.exe - Unable to locate Component" and
    "This application has failed to start because libbz2.dll was not found".
    The gem requires this DLL but doesn't provide it. Should it?

    I can obviously update my Ruby version, except that this is the
    version that we use in our standard build environment.

    > I wonder if the problem has something to do
    > with using a version of zlib to unzip a file that is older than the
    > version is was zipped with? Ruby 1.8.2, for which this RMagick gem was
    > built, has ZLIB::VERSION 1.2.1.


    Again, it's probably a Ruby version issue. However we can't always
    expect everyone to have the most recent version, we should be careful
    with forwards and backwards compatibility... I've had these kinds of
    problems with Perl also, being stuck at an old version because we use
    perl2exe, but the PPM repository doesn't bother keeping packages that
    work with the old version... sigh.
    Clifford Heath, Jun 2, 2006
    #5
  6. Clifford Heath wrote:
    > I can obviously update my Ruby version...


    Which I've now done, and RMagick, and ImageMagick, and Gtk...
    all 16 zip files of the various pieces, to wit:

    atk-1.10.3.zip
    freetype-2.1.10-bin.zip
    freetype-2.1.10-dep.zip
    gettext-0.14.5.zip
    glib-2.10.3.zip
    gtk+-2.8.18.zip
    jpeg-6b-4-bin.zip
    jpeg-6b-4-dep.zip
    libiconv-1.9.1.bin.woe32.zip
    libpng-1.2.8-bin.zip
    libpng-1.2.8-dep.zip
    pango-1.12.3.zip
    ruby-gtk2-0.14.1-1-i386-msvcrt-1.zip
    tiff-3.8.2-1-bin.zip
    tiff-3.8.2-1-dep.zip
    zlib123-dll.zip

    .... and now Gtk2 won't start. Sigh. Sometimes open source is hard
    to believe in. Sorry to whinge, but you've gotta wonder whether
    folk test the stuff they publish.
    Clifford Heath, Jun 2, 2006
    #6
  7. Tim Hunter wrote:
    > My understanding is that "require_gem" is deprecated. All you need to do is
    > require 'rubygems'
    > require 'RMagick'


    Ok, that sounds sensible, it's what I expected would happen. Even better
    if rubygems isn't required. I think I was screwed-up by still having the
    old version of Ruby installed as well.

    > The gem supplies all the .dlls you need. This message usually occurs
    > when you try to use RMagick before running the postinstall.rb script.


    postinstall.rb bitches... but after completely uninstalling Ruby and
    starting again, it's ok. Now I have to work out how to get Gtk2 to
    install cleanly :).
    Clifford Heath, Jun 5, 2006
    #7
  8. Thanks for this thread, guys.. (found via Google search) =)

    I totally forgot about that 'ruby postinstall.rb' thing that was
    required to get it to work on windows.

    Clifford Heath wrote:
    > Tim Hunter wrote:
    > > My understanding is that "require_gem" is deprecated. All you need to do is
    > > require 'rubygems'
    > > require 'RMagick'

    >
    > Ok, that sounds sensible, it's what I expected would happen. Even better
    > if rubygems isn't required. I think I was screwed-up by still having the
    > old version of Ruby installed as well.
    >
    > > The gem supplies all the .dlls you need. This message usually occurs
    > > when you try to use RMagick before running the postinstall.rb script.

    >
    > postinstall.rb bitches... but after completely uninstalling Ruby and
    > starting again, it's ok. Now I have to work out how to get Gtk2 to
    > install cleanly :).
    Shanti Braford, Jun 9, 2006
    #8
    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. Kaspar Schiess

    [ANN] RMagick 1.6.0 win32 binary (GEM)

    Kaspar Schiess, Sep 3, 2004, in forum: Ruby
    Replies:
    0
    Views:
    111
    Kaspar Schiess
    Sep 3, 2004
  2. Replies:
    1
    Views:
    104
  3. yang jdong
    Replies:
    7
    Views:
    113
    yang jdong
    Mar 15, 2006
  4. Replies:
    0
    Views:
    129
  5. Pito Salas
    Replies:
    1
    Views:
    138
    Tim Hunter
    Apr 24, 2009
Loading...

Share This Page