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

C

Clifford Heath

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?
 
C

Clifford Heath

Tim said:
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.
 
C

Clifford Heath

Tim said:
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.
 
C

Clifford Heath

Tim said:
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.
 
C

Clifford Heath

Tim said:
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.
 
C

Clifford Heath

Clifford said:
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.
 
C

Clifford Heath

Tim said:
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 :).
 
S

Shanti Braford

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top