Ferret won't load on my mac

I’ve installed ferret (11.6) on my mac with gem install ferret, and
installed acts_as_ferret into my rails application. This causes my
app to crash.

gem claims to have installed ferret successfully. However, every
attempt to load it produces a bundle load error.

The clearest example of error is when I try to run script/console:
[18:33:25] EclipticDB$ script/console
Loading development environment (Rails 2.0.2)
/usr/local/lib/ruby/gems/1.8/gems/ferret-0.11.6/lib/ferret_ext.bundle:
Failed to load
/usr/local/lib/ruby/gems/1.8/gems/ferret-0.11.6/lib/ferret_ext.bundle
(LoadError)
from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in
`require’

[snip stack details]

    from /usr/local/bin/irb:13

I get similar errors when I go to the gem directory and try to run the
ferret tests.

My suspicion is that ferret is compiling with -arch hardcoded to i386,
and my mac is a PPC Mac (Dual 2Ghz G5), because I saw similar problems
with imageMagick a while ago. I am not sure how to confirm this, or
what to do to fix the problem.

I’m new to this forum and I haven’t got aaf to work yet, but I’ll try to
help.

Maybe you can try:

script/plugin install
svn://projects.jkraemer.net/acts_as_ferret/tags/stable/acts_as_ferret

At least I don’t get the errors you’re getting, though I have an Intel
architecture. All my files in the lib directory are pure ruby files, so
it’s puzzling why you have .bundle files.

Another thing:

Earlier I tried to use the aaf gem, but I couldn’t start the aaf
server.As a last resort, I uninstalled the gem, and with the plugin
installed locally, I no longer get an error starting the ferret server.
So my suggestion is try to just install ferret into your project.

Cheers,

Evan D. wrote:

I’ve installed ferret (11.6) on my mac with gem install ferret, and
installed acts_as_ferret into my rails application. This causes my
app to crash.

gem claims to have installed ferret successfully. However, every
attempt to load it produces a bundle load error.

The clearest example of error is when I try to run script/console:
[18:33:25] EclipticDB$ script/console
Loading development environment (Rails 2.0.2)
/usr/local/lib/ruby/gems/1.8/gems/ferret-0.11.6/lib/ferret_ext.bundle:
Failed to load
/usr/local/lib/ruby/gems/1.8/gems/ferret-0.11.6/lib/ferret_ext.bundle
(LoadError)
from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in
`require’

[snip stack details]

    from /usr/local/bin/irb:13

I get similar errors when I go to the gem directory and try to run the
ferret tests.

My suspicion is that ferret is compiling with -arch hardcoded to i386,
and my mac is a PPC Mac (Dual 2Ghz G5), because I saw similar problems
with imageMagick a while ago. I am not sure how to confirm this, or
what to do to fix the problem.

Taro Fu wrote:

script/plugin install
svn://projects.jkraemer.net/acts_as_ferret/tags/stable/acts_as_ferret

At least I don’t get the errors you’re getting, though I have an Intel
architecture. All my files in the lib directory are pure ruby files, so
it’s puzzling why you have .bundle files.

My problem is not with the acts_as_ferret plugin (which is all ruby),
but with the ferret gem, which uses C libraries that must be compiled
locally into a bundle. Ferret must be installed for acts_as_ferret to
work.

I did eventually manage to get it working by hacking the Makefile in the
ferret gem to set “-arch ppc” and recompiling the bundle manually.
It’s pretty annoying that the gem installer assumes i386, though, I
can’t be the only rails developer out there still using a ppc mac.