简单的sinatra app:
require 'rubygems'
require 'sinatra'
get '/' do
"Hey"
end
然后:
$ ruby test.rb
当我点击http://localhost:4567时,它会断开连接,我得到:
/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
所有宝石都是最新的。我正在运行ruby 1.8.7(2008-08-11 patchlevel 72)[i686-darwin9.6.0]
答案 0 :(得分:1)
我怀疑Thin是编译为32位模块而你正在使用x86_64 Ruby(或其他方式)