hpricot on mac os 10.6

53 views
Skip to first unread message

timr

unread,
Dec 6, 2009, 9:33:32 PM12/6/09
to Ruby on Rails: Talk
Could anyone help me get hpricot working on mac os 10.6.2 (ruby
version 1.9.2)?

Example install is provided. The hpricot_scan bundle is apparently not
the correct architecture. I don't know what to do about that since I
tried providing the architecture during the gem install.
Thanks in advance,
Tim

Tim:~/Desktop/RubyClub> sudo env ARCHFLAGS="-arch i386" gem install
why-hpricot --source http://gems.github.com
Building native extensions. This could take a while...
Successfully installed why-hpricot-0.7.229
1 gem installed
Installing ri documentation for why-hpricot-0.7.229...
Installing RDoc documentation for why-hpricot-0.7.229...
Tim:~/Desktop/RubyClub> gem which hpricot
(checking gem why-hpricot-0.7.229 for hpricot)
/usr/local/lib/ruby19/gems/1.9.1/gems/why-hpricot-0.7.229/lib/
hpricot.rb
Tim:~/Desktop/RubyClub> ruby -e 'require "hpricot"'
/usr/local/lib/ruby19/gems/1.9.1/gems/why-hpricot-0.7.229/lib/
hpricot.rb:20:in `require': dlopen(/usr/local/lib/ruby19/gems/1.9.1/
gems/why-hpricot-0.7.229/lib/hpricot_scan.bundle, 9): no suitable
image found. Did find: (LoadError)
/usr/local/lib/ruby19/gems/1.9.1/gems/why-hpricot-0.7.229/lib/
hpricot_scan.bundle: mach-o, but wrong architecture - /usr/local/lib/
ruby19/gems/1.9.1/gems/why-hpricot-0.7.229/lib/hpricot_scan.bundle
from /usr/local/lib/ruby19/gems/1.9.1/gems/why-hpricot-0.7.229/lib/
hpricot.rb:20:in `<top (required)>'
from -e:1:in `require'
from -e:1:in `<main>'

Rick

unread,
Dec 7, 2009, 1:43:31 PM12/7/09
to Ruby on Rails: Talk
Not sure about why-hpricot but hpricot (0.8.2) runs under ruby 1.9.2

$ ruby --version
ruby 1.9.2dev (2009-10-18 trunk 25393) [powerpc-darwin9.8.0]

As you can see from the above, I'm running ppc / osx 10.5.8 so no
guidance specific to intel/10.6.

You might try ...gem install hpricot

Also, don't know if you're aware but here are some links from the
hpricot README:

-----------------
First, here are all the links you need to know:

* http://wiki.github.com/hpricot/hpricot is the Hpricot wiki and
http://github.com/hpricot/hpricot/issues is the bug tracker.
Go there for news and recipes and patches. It's the center of
activity.
* http://github.com/hpricot/hpricot is the main Git
repository for Hpricot. You can get the latest code there.
* See COPYING for the terms of this software. (Spoiler: it's
absolutely free.)

If you have any trouble, don't hesitate to contact the author. As
always, I'm
not going to say "Use at your own risk" because I don't want this
library to be
risky. If you trip on something, I'll share the liability by repairing
things
as quickly as I can. Your responsibility is to report the
inadequacies.
-----------------

good luck

On Dec 6, 9:33 pm, timr <timra...@gmail.com> wrote:
> Could anyone help me get hpricot working on mac os 10.6.2 (ruby
> version 1.9.2)?
>
> Example install is provided. The hpricot_scan bundle is apparently not
> the correct architecture. I don't know what to do about that since I
> tried providing the architecture during the gem install.
> Thanks in advance,
> Tim
>
> Tim:~/Desktop/RubyClub> sudo env ARCHFLAGS="-arch i386" gem install
> why-hpricot --sourcehttp://gems.github.com

Frederick Cheung

unread,
Dec 7, 2009, 2:06:39 PM12/7/09
to Ruby on Rails: Talk


On Dec 7, 2:33 am, timr <timra...@gmail.com> wrote:
> Could anyone help me get hpricot working on mac os 10.6.2 (ruby
> version 1.9.2)?
>
> Example install is provided. The hpricot_scan bundle is apparently not
> the correct architecture. I don't know what to do about that since I
> tried providing the architecture during the gem install.

is the architecture you specified the right architecture (ie is your
ruby x86_64 ) ?

Fred
> Thanks in advance,
> Tim
>
> Tim:~/Desktop/RubyClub> sudo env ARCHFLAGS="-arch i386" gem install
> why-hpricot --sourcehttp://gems.github.com
Reply all
Reply to author
Forward
0 new messages