[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

can't install hpricot on cygwin

Feng Tien

11/25/2007 8:19:00 AM

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.
--
Posted via http://www.ruby-....

6 Answers

Peter Szinek

11/25/2007 9:47:00 AM

0

Feng Tien wrote:
> 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.rubyra...
http://s...

Andrei Maxim

11/25/2007 9:54:00 AM

0

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

On 11/25/07, Feng Tien <pood.forums@gmail.com> wrote:
>
> 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.
> --
> Posted via http://www.ruby-....
>
>


--
Andrei Maxim
http://andr...

Andrei Maxim

11/25/2007 9:55:00 AM

0

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.

On 11/25/07, Andrei Maxim <andrei@andreimaxim.ro> wrote:
>
> 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`)
>
> On 11/25/07, Feng Tien <pood.forums@gmail.com> wrote:
> >
> > 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.
> > --
> > Posted via http://www.ruby-....
> >
> >
>
>
> --
> Andrei Maxim
> http://andr...
>



--
Andrei Maxim
http://andr...

Feng Tien

11/25/2007 6:43:00 PM

0

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.co...
fill_textfield 'q', 'ruby'
submit

result 'Ruby Programming Language'
end

google_data.to_xml.write($stdout, 1)
Scrubyt::ResultDumper.print_statistics(google_data)
===
--
Posted via http://www.ruby-....

Feng Tien

11/25/2007 7:18:00 PM

0

my Aptana was causing this problem! doing this thru command line, I
don't get this error.
--
Posted via http://www.ruby-....

Peter Szinek

11/26/2007 12:01:00 AM

0

Feng Tien 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.rubyra...
http://s...