views:

304

answers:

1

Simple sinatra app:

require 'rubygems'
require 'sinatra'

get '/' do
  "Hey"
end

Then:

$ ruby test.rb

And when I hit http://localhost:4567, it drops the connection and I get:

/usr/local/lib/ruby/gems/1.8/gems/thin-1.2.5/lib/thin_parser.bundle: dlopen(/usr/local/lib/ruby/gems/1.8/gems/thin-1.2.5/lib/thin_parser.bundle, 9): no suitable image found.  Did find: (LoadError)
/usr/local/lib/ruby/gems/1.8/gems/thin-1.2.5/lib/thin_parser.bundle: unknown required load command 0x80000022 - /usr/local/lib/ruby/gems/1.8/gems/thin-1.2.5/lib/thin_parser.bundle

All gems are up-to-date. I am running ruby 1.8.7 (2008-08-11 patchlevel 72) [i686-darwin9.6.0]

A: 

I suspect that Thin is compiled as a 32-bit module and you're using x86_64 Ruby (or the other way around)

Paul Betts
ah, that would make sense. using `gem install`, how would I fix this?
Kyle
That is trickier - maybe try setting "ARCH=x86"? You might have to install it by hand and hack some Rakefiles
Paul Betts