2

I just installed Snow Leopard and now I am getting the following error when trying to access a site running under Passenger:

/usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.4/ext/phusion_passenger/native_support.bundle: dlopen(/usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.4/ext/phusion_passenger/native_support.bundle, 9): no suitable image found.  Did find: (LoadError)
/usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.4/ext/phusion_passenger/native_support.bundle: mach-o, but wrong architecture - /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.4/ext/phusion_passenger/native_support.bundle
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/utils.rb:35
from /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.4/bin/passenger-spawn-server:53:in `require'
from /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.4/bin/passenger-spawn-server:53

I have reinstalled the passenger gem, I have run the installer script and updated the apache conf file according to the instructions.

I also tried to reinstall the gem with env ARCHFLAGS="-arch x86_64" without any luck

magnushjelm
  • 123
  • 5
  • This might be helpful for somebody: http://www.gregbenedict.com/2009/08/29/fixing-ruby-gems-mysql-and-passenger-phusion-on-snow-leopard-10-6/ (Didn't solve my problem) – magnushjelm Aug 30 '09 at 13:26

1 Answers1

0

I had the same issue - the fix was to recompile ruby to be 64-bit instead of 32.

You can check to see what architecture your ruby uses like this:

> file `which ruby`
/usr/local/bin/ruby: Mach-O 64-bit executable x86_64

If it reports i386 instead of x86_64 - then you probably have the same issue.

(before recompiling mine was "Mach-O executable i386")

Kind of a pain because after this you'll need to recompile/reinstall any gems w/ native extensions. I haven't done this yet, but I saw somewhere that you might be able to do it "easily" using sudo gem pristine --all

user18991
  • 116