Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

share|improve this question
    
This might be helpful for somebody: gregbenedict.com/2009/08/29/… (Didn't solve my problem) –  magnushjelm Aug 30 '09 at 13:26

1 Answer 1

up vote 0 down vote accepted

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.