Forum: Ruby Can't install racc

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
1b83301c2dd25b97a58600e4a1cee0d3?d=identicon&s=25 Rodion Raskolnikov (roddik)
on 2009-06-09 16:00
Hello, I'm trying to install the mechanize gem on ruby 1.8.6, and it
requires nokogiri and racc. When trying to install racc, I get the
following error

C:\Documents and Settings\roddik>gem install racc
Building native extensions.  This could take a while...
ERROR:  While executing gem ... (Gem::Installer::ExtensionBuildError)
    ERROR: Failed to build gem native extension.

ruby extconf.rb install racc
creating Makefile

nmake

Microsoft (R) Program Maintenance Utility   Version 1.50
Copyright (c) Microsoft Corp 1988-94. All rights reserved.

        cl -nologo -I. -ID:/ruby/lib/ruby/1.8/i386-mswin32
-ID:/ruby/lib/ruby/1.
8/i386-mswin32 -I. -MD -Zi -O2b2xg- -G6  -c -Tccparse.c
"cl" не является внутренней или внешней
командой, исполняемой программой или 
пакетным файлом.
NMAKE : fatal error U1077: 'C:\WINDOWS\system32\cmd.exe' : return code
'0x1'
Stop.


Gem files will remain installed in
D:/ruby/lib/ruby/gems/1.8/gems/racc-1.4.6 for
 inspection.
Results logged to
D:/ruby/lib/ruby/gems/1.8/gems/racc-1.4.6/ext/racc/cparse/gem_
make.out

gem_make.out resembles this message, so I don't post it. How can I fix
the problem? TIA
58479f76374a3ba3c69b9804163f39f4?d=identicon&s=25 Eric Hodel (Guest)
on 2009-06-09 20:45
(Received via mailing list)
On Jun 9, 2009, at 07:00, Rod Dik wrote:

> Hello, I'm trying to install the mechanize gem on ruby 1.8.6, and it
> requires nokogiri and racc. When trying to install racc, I get the
> following error

racc is a development dependency of mechanize.  You probably need to
upgrade your RubyGems.
1b83301c2dd25b97a58600e4a1cee0d3?d=identicon&s=25 Rodion Raskolnikov (roddik)
on 2009-06-09 21:10
Eric Hodel wrote:
> On Jun 9, 2009, at 07:00, Rod Dik wrote:
>
>> Hello, I'm trying to install the mechanize gem on ruby 1.8.6, and it
>> requires nokogiri and racc. When trying to install racc, I get the
>> following error
>
> racc is a development dependency of mechanize.  You probably need to
> upgrade your RubyGems.

Thanks, updating gems helped, now I get the following error when
requiring mechanize

WARNING: Nokogiri was built against LibXML version 2.7.3, but has
dynamically loaded 2.6.27
D:/ruby/lib/ruby/gems/1.8/gems/nokogiri-1.3.1-x86-mswin32/lib/nokogiri/html/document.rb:65:
[BUG] Segmentation fault
ruby 1.8.6 (2008-08-11) [i386-mswin32]

Can it be caused by LibXML disparity? I've downloaded it, can't figure
out yet how to install..
Be30361bb0b0c495e3077db43ad84b56?d=identicon&s=25 Aaron Patterson (Guest)
on 2009-06-09 21:21
(Received via mailing list)
On Wed, Jun 10, 2009 at 04:10:32AM +0900, Rod Dik wrote:
> Thanks, updating gems helped, now I get the following error when
> requiring mechanize
>
> WARNING: Nokogiri was built against LibXML version 2.7.3, but has
> dynamically loaded 2.6.27
> 
D:/ruby/lib/ruby/gems/1.8/gems/nokogiri-1.3.1-x86-mswin32/lib/nokogiri/html/document.rb:65:
> [BUG] Segmentation fault
> ruby 1.8.6 (2008-08-11) [i386-mswin32]
>
> Can it be caused by LibXML disparity? I've downloaded it, can't figure
> out yet how to install..

If you're also requiring libxml-ruby, that might be your problem.  Can
you try requiring nokogiri from irb to verify that?

Nokogiri ships with libxml2 2.7.3, so if you have it somewhere else in
your path, that would cause the problem.
1b83301c2dd25b97a58600e4a1cee0d3?d=identicon&s=25 Rodion Raskolnikov (roddik)
on 2009-06-09 21:30
Aaron Patterson wrote:
> On Wed, Jun 10, 2009 at 04:10:32AM +0900, Rod Dik wrote:
>> Thanks, updating gems helped, now I get the following error when
>> requiring mechanize
>>
>> WARNING: Nokogiri was built against LibXML version 2.7.3, but has
>> dynamically loaded 2.6.27
>> 
D:/ruby/lib/ruby/gems/1.8/gems/nokogiri-1.3.1-x86-mswin32/lib/nokogiri/html/document.rb:65:
>> [BUG] Segmentation fault
>> ruby 1.8.6 (2008-08-11) [i386-mswin32]
>>
>> Can it be caused by LibXML disparity? I've downloaded it, can't figure
>> out yet how to install..
>
> If you're also requiring libxml-ruby, that might be your problem.  Can
> you try requiring nokogiri from irb to verify that?
>
> Nokogiri ships with libxml2 2.7.3, so if you have it somewhere else in
> your path, that would cause the problem.

I've found another libxml2.dll file in c:/windows, replaced it with the
one from nokogiri (maybe some other soft will search for it there), and
it fixed the problem! Thanks a lot!
This topic is locked and can not be replied to.