Forum: Ruby Can't install hpricot gem

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.
D4402a8a978750279198f8d2a2da6461?d=identicon&s=25 Boris Barroso (boriscy)
on 2009-04-22 00:40
I can't install hpricot gem on CentOS 5, you can check the error message
at this address http://dpaste.com/36490/, I have tried many things like
reinstalling ruby ruby-devel I have installed almost all things needed,
zlib zlib-devel and others.
58479f76374a3ba3c69b9804163f39f4?d=identicon&s=25 Eric Hodel (Guest)
on 2009-04-22 05:47
(Received via mailing list)
On Apr 21, 2009, at 15:40, Boris Barroso wrote:

> I can't install hpricot gem on CentOS 5, you can check the error
> message
> at this address http://dpaste.com/36490/, I have tried many things
> like
> reinstalling ruby ruby-devel I have installed almost all things
> needed,
> zlib zlib-devel and others.

What is your ruby version?

I suspect it is too old.  Try with 1.8.6.
64a808c19ac542b14c4021dcb9484a37?d=identicon&s=25 Ruby Student (Guest)
on 2009-04-22 15:19
(Received via mailing list)
On Tue, Apr 21, 2009 at 11:45 PM, Eric Hodel <drbrain@segment7.net>
wrote:

> I suspect it is too old.  Try with 1.8.6.
>
>
I, also, can't installed hpricot on Windows/XP, and I have the latest
Ruby
installed:
C:\>ruby -v
ruby 1.9.1p0 (2009-01-30 revision 21907) [i386-mingw32]

C:\>gem install hpricot
Building native extensions.  This could take a while...
ERROR:  Error installing hpricot:
        ERROR: Failed to build gem native extension.

C:/ruby/bin/ruby.exe extconf.rb install hpricot
checking for main() in -lc... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=C:/ruby/bin/ruby
        --with-hpricot_scan-dir
        --without-hpricot_scan-dir
        --with-hpricot_scan-include
        --without-hpricot_scan-include=${hpricot_scan-dir}/include
        --with-hpricot_scan-lib
        --without-hpricot_scan-lib=${hpricot_scan-dir}/lib
        --with-clib
        --without-clib
C:/ruby/lib/ruby/1.9.1/mkmf.rb:362:in `try_do': The complier failed to
generate an executable file. (RuntimeError)
You have to install development tools first.
        from C:/ruby/lib/ruby/1.9.1/mkmf.rb:415:in `try_link0'
        from C:/ruby/lib/ruby/1.9.1/mkmf.rb:419:in `try_link'
        from C:/ruby/lib/ruby/1.9.1/mkmf.rb:527:in `try_func'
        from C:/ruby/lib/ruby/1.9.1/mkmf.rb:723:in `block in
have_library'
        from C:/ruby/lib/ruby/1.9.1/mkmf.rb:668:in `block in
checking_for'
        from C:/ruby/lib/ruby/1.9.1/mkmf.rb:274:in `block (2 levels) in
postpone'
        from C:/ruby/lib/ruby/1.9.1/mkmf.rb:248:in `open'
        from C:/ruby/lib/ruby/1.9.1/mkmf.rb:274:in `block in postpone'
        from C:/ruby/lib/ruby/1.9.1/mkmf.rb:248:in `open'
        from C:/ruby/lib/ruby/1.9.1/mkmf.rb:270:in `postpone'
        from C:/ruby/lib/ruby/1.9.1/mkmf.rb:667:in `checking_for'
        from C:/ruby/lib/ruby/1.9.1/mkmf.rb:718:in `have_library'
        from extconf.rb:4:in `<main>'


Gem files will remain installed in
C:/ruby/lib/ruby/gems/1.9.1/gems/hpricot-0.8.1 for inspection.
Results logged to
C:/ruby/lib/ruby/gems/1.9.1/gems/hpricot-0.8.1/ext/hpricot_scan/gem_make.out


Regards,
D4402a8a978750279198f8d2a2da6461?d=identicon&s=25 Boris Barroso (boriscy)
on 2009-04-22 15:32
Boris Barroso wrote:
> I can't install hpricot gem on CentOS 5, you can check the error message
> at this address http://dpaste.com/36490/, I have tried many things like
> reinstalling ruby ruby-devel I have installed almost all things needed,
> zlib zlib-devel and others.

Hi there I have installed ruby enterprise and now I can isntall there
hpricot and other gems that I could not install, ther might be some
problems with the ruby version in CentOS 5 (1.8.5)
Thanx for the help
64a808c19ac542b14c4021dcb9484a37?d=identicon&s=25 Ruby Student (Guest)
on 2009-04-22 15:49
(Received via mailing list)
On Wed, Apr 22, 2009 at 9:32 AM, Boris Barroso <boriscyber@gmail.com>
wrote:

> --
> Posted via http://www.ruby-forum.com/.
>
>
What's Ruby "enterprise"?
8f6f95c4bd64d5f10dfddfdcd03c19d6?d=identicon&s=25 Rick Denatale (rdenatale)
on 2009-04-22 15:57
(Received via mailing list)
On Wed, Apr 22, 2009 at 9:49 AM, Ruby Student
<ruby.student@gmail.com>wrote:

> >
> > Hi there I have installed ruby enterprise and now I can isntall there
> > hpricot and other gems that I could not install, ther might be some
> > problems with the ruby version in CentOS 5 (1.8.5)
> > Thanx for the help
> > --
> > Posted via http://www.ruby-forum.com/.
> >
> >
> What's Ruby "enterprise"?
>

Basically, it's a version of Ruby 1.8.x with some changes (primarily a
garbage collector which supports copy-on-write) which reduces the
overall
memory footprint of multiple Ruby processes for Rails/Merb/Sinatra or
other
rack-based web server deployments.

http://www.rubyenterpriseedition.com/faq.html

--
Rick DeNatale

Blog: http://talklikeaduck.denhaven2.com/
Twitter: http://twitter.com/RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: http://www.linkedin.com/in/rickdenatale
64a808c19ac542b14c4021dcb9484a37?d=identicon&s=25 Ruby Student (Guest)
on 2009-04-22 17:35
(Received via mailing list)
On Wed, Apr 22, 2009 at 9:56 AM, Rick DeNatale
<rick.denatale@gmail.com>wrote:

> > like
> > >
>
> --
> Rick DeNatale
>
> Blog: http://talklikeaduck.denhaven2.com/
> Twitter: http://twitter.com/RickDeNatale
> WWR: http://www.workingwithrails.com/person/9021-rick-denatale
> LinkedIn: http://www.linkedin.com/in/rickdenatale
>

Interesting!Thank you for the explanation!
58479f76374a3ba3c69b9804163f39f4?d=identicon&s=25 Eric Hodel (Guest)
on 2009-04-22 20:35
(Received via mailing list)
On Apr 22, 2009, at 06:18, Ruby Student wrote:
> You have to install development tools first.
Seems pretty clear to me.
64a808c19ac542b14c4021dcb9484a37?d=identicon&s=25 Ruby Student (Guest)
on 2009-04-22 21:05
(Received via mailing list)
On Wed, Apr 22, 2009 at 2:34 PM, Eric Hodel <drbrain@segment7.net>
wrote:

>> C:/ruby/lib/ruby/1.9.1/mkmf.rb:362:in `try_do': The complier failed to
>> generate an executable file. (RuntimeError)
>> You have to install development tools first.
>>
>
> Seems pretty clear to me.
>
>
Yes! It is also clear to me. What is not clear, to me, is which
"development
tools" I need to install.
Thank you
E499316b44ad6a829c4e18e07b23f0d9?d=identicon&s=25 Marcel Corso (marcelcorso)
on 2010-02-10 17:47
On ubuntu 9.10 I had to install the ruby-dev package

sudo apt-get install ruby1.8-dev
34c8e395697b41a7c7a4dc181c0f1ea8?d=identicon&s=25 Ethan (Guest)
on 2010-03-04 06:36
(Received via mailing list)
On Feb 10, 10:49 am, Marcel Corso <marcel.co...@gmail.com> wrote:
> On ubuntu 9.10 I had to install the ruby-dev package
>
> sudo apt-get install ruby1.8-dev
> --
> Posted viahttp://www.ruby-forum.com/.

Has anybody gotten this error on Windows 7?

Trying to install rmagick gem an getting the following.  Also not sure
which development tools to install.


C:\Ruby19\bin>gem install rmagick
Building native extensions.  This could take a while...
ERROR:  Error installing rmagick:
        ERROR: Failed to build gem native extension.

C:/Ruby19/bin/ruby.exe extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for stdint.h... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=C:/Ruby19/bin/ruby
C:/Ruby19/lib/ruby/1.9.1/mkmf.rb:364:in `try_do': The complier failed
to generate an executable file. (RuntimeError)
You have to install development tools first.
        from C:/Ruby19/lib/ruby/1.9.1/mkmf.rb:433:in `try_cpp'
        from C:/Ruby19/lib/ruby/1.9.1/mkmf.rb:811:in `block in
have_header'
        from C:/Ruby19/lib/ruby/1.9.1/mkmf.rb:670:in `block in
checking_for'
        from C:/Ruby19/lib/ruby/1.9.1/mkmf.rb:276:in `block (2 levels)
in postpone'
        from C:/Ruby19/lib/ruby/1.9.1/mkmf.rb:250:in `open'
        from C:/Ruby19/lib/ruby/1.9.1/mkmf.rb:276:in `block in
postpone'
        from C:/Ruby19/lib/ruby/1.9.1/mkmf.rb:250:in `open'
        from C:/Ruby19/lib/ruby/1.9.1/mkmf.rb:272:in `postpone'
        from C:/Ruby19/lib/ruby/1.9.1/mkmf.rb:669:in `checking_for'
        from C:/Ruby19/lib/ruby/1.9.1/mkmf.rb:810:in `have_header'
        from extconf.rb:171:in `<main>'


Gem files will remain installed in C:/Ruby19/lib/ruby/gems/1.9.1/gems/
rmagick-2.12.2 for inspection.
Results logged to C:/Ruby19/lib/ruby/gems/1.9.1/gems/rmagick-2.12.2/
ext/RMagick/gem_make.out
E7cff3cfd41c495e1012227d7dc24202?d=identicon&s=25 Luis Lavena (luislavena)
on 2010-03-04 10:35
(Received via mailing list)
On Mar 4, 6:29 am, Ethan <otter...@gmail.com> wrote:
> Trying to install rmagick gem an getting the following.  Also not sure
> Could not create Makefile due to some reason, probably lack of
>         --with-make-prog
>         from C:/Ruby19/lib/ruby/1.9.1/mkmf.rb:670:in `block in
>         from extconf.rb:171:in `<main>'
>
> Gem files will remain installed in C:/Ruby19/lib/ruby/gems/1.9.1/gems/
> rmagick-2.12.2 for inspection.
> Results logged to C:/Ruby19/lib/ruby/gems/1.9.1/gems/rmagick-2.12.2/
> ext/RMagick/gem_make.out

Please, do not hijack threads, if you do that, any valid answer you
get may not be easy to be found in the future for people facing the
same issue.

Now, what version of Ruby 1.9 you have? (ruby -v)

The "error" you're receiving is basically because that particular gem
has no binaries for Windows, as you can see here:

http://rubygems.org/gems/rmagick

At this time, all the RMagick gem installation require a download of a
zip package and read some instructions:

http://rubyforge.org/frs/shownotes.php?release_id=39888

But please keep in mind that binary gem is for Ruby 1.8, it will not
work under 1.9

Please look in RubyForge project page and own discussion section about
RMagick and Ruby 1.9 support:

http://rubyforge.org/projects/rmagick/

HTH,
9aea00189fa56d5b48a69165047916bd?d=identicon&s=25 Pavel Vorobyov (viert)
on 2010-12-22 07:38
Ethan wrote in post #893993:
> C:/Ruby19/bin/ruby.exe extconf.rb
> checking for Ruby version >= 1.8.5... yes
> checking for stdint.h... *** extconf.rb failed ***
> Could not create Makefile due to some reason, probably lack of
> necessary libraries and/or headers.  Check the mkmf.log file for more
> details.  You may need configuration options.

I don't know if it's still actual for you Ethan but I've got the same
error today trying to install rqr gem with latest ruby(1.9.2dev). This
error happens during try_cpp function and it gave me a clue that
something is wrong with my C++ compiler. Despite the fact that cpp was
installed I still got the error and tried to install g++ using apt-get
(i have ubuntu 10.04). Surprisely it works.

Hope this helped
This topic is locked and can not be replied to.