Can't install hpricot on cygwin

I’m trying to run scRUBYt on winXp, but found out it just doesn’t work.

So the work around is to use cygwin.

I’m trying to install Hpricot

I keep on getting this error:

============
ERROR: Error installing hpricot:
ERROR: Failed to build gem native extension.

/usr/bin/ruby.exe extconf.rb install hpricot
checking for main() in -lc…no
creating Makefile

make gcc -I. -I. -I/usr/lib/ruby/1.8/i386-cygwin -I. -g -02 -c
hpricot_scan.c
make gcc: Command not found
make: *** [hpricot.scan.o] 127

===========

I’ve installed FlexMock using gems just fine in cygwin, so what’s wrong?

When trying to install Mechanize, I get the exact same message, can’t
make hpricot.

Feng T. wrote:

ERROR: Error installing hpricot:

===========

I’ve installed FlexMock using gems just fine in cygwin, so what’s wrong?

I think the trick is that in FlexMock’s case, you did not have to
compile anything - but this doesn’t hold for Hpricot. You need a C
compiler. Unfortunately I have no idea how to get that on cygwin, but it
shouldn’t be that complicated.

Let me know if this solves the problem for you!

Cheers,
Peter


http://www.rubyrailways.com
http://scrubyt.org

Feng,
Check your Cygwin installation and make sure you have gcc installed.
It’s
under compilers or something like that. It seems that the line that’s
throwing the error is

make gcc: Command not found

I have a somewhat limited experience with Ruby, Windows XP and Cygwin
but I
remember that a gem installed from the Windows command line will work in
Cygwin too (at least it’s present when I issue a gem list)

Just to be extra clear: if you build it on WinXP you don’t need to
install
GCC. If you want to built it in Cygwin, you’ll probably need GCC.

my Aptana was causing this problem! doing this thru command line, I
don’t get this error.

that did the trick!

but now i get this error:

===
/usr/lib/ruby/gems/1.8/gems/hpricot-0.6/lib/hpricot/builder.rb:11:
warning: `&’ interpreted as argument prefix
(eval):2: warning: instance variable @is_simple_type not initialized
(eval):2: warning: instance variable @is_simple_type not initialized
(eval):2: warning: instance variable @is_simple_type not initialized
(eval):2: warning: instance variable @is_simple_type not initialized
(eval):2: warning: instance variable @is_pointer_type not initialized
(eval):2: warning: instance variable @is_pointer_type not initialized
(eval):2: warning: instance variable @is_pointer_type not initialized
(eval):2: warning: instance variable @is_simple_type not initialized
(eval):2: warning: instance variable @is_simple_type not initialized
(eval):2: warning: instance variable @is_pointer_type not initialized
(eval):2: warning: instance variable @is_simple_type not initialized
(eval):2: warning: instance variable @is_simple_type not initialized
/cygdrive/c/Documents and Settings/pood is insecure (40770). It may not
be group or world writable. Exiting.
and so on…

===

when trying to run this:

===require ‘rubygems’
require ‘scrubyt’

google_data = Scrubyt::Extractor.define do
fetch ‘Google
fill_textfield ‘q’, ‘ruby’
submit

result ‘Ruby P.ming Language’
end

google_data.to_xml.write($stdout, 1)
Scrubyt::ResultDumper.print_statistics(google_data)

Feng T. wrote:

my Aptana was causing this problem! doing this thru command line, I
don’t get this error.

Great! So welcome to scRUBYt!. Please note that there is a #scrubyt
channel on irc.freenode.net now, and I’ll be usually hanging out there,
so if you need some quick info on how to go on, be sure to drop in!

Cheers,
Peter


http://www.rubyrailways.com
http://scrubyt.org