can't install hpricot on cygwin

F

Feng Tien

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.
 
P

Peter Szinek

Feng said:
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?

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
 
A

Andrei Maxim

Note: parts of this message were removed by the gateway to make it a legal Usenet post.

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`)

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.
 
A

Andrei Maxim

Note: parts of this message were removed by the gateway to make it a legal Usenet post.

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.

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`)

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.
 
F

Feng Tien

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 'http://www.google.com/ncr'
fill_textfield 'q', 'ruby'
submit

result 'Ruby Programming Language'
end

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

Feng Tien

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

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,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top