Sinatra 1.0 fastcgi deployment

Posted by TheMoonMaster on Stack Overflow See other posts from Stack Overflow or by TheMoonMaster
Published on 2010-03-30T21:31:34Z Indexed on 2010/03/30 21:33 UTC
Read the original article Hit count: 572

Filed under:
|
|
|

I am trying to deploy my sinatra app to my hosting(shared) and I keep getting this error.

/usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/handler/fastcgi.rb:23:in `initialize': Address family not supported by protocol - socket(2) (Errno::EAFNOSUPPORT)
    from /usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/handler/fastcgi.rb:23:in `new'
    from /usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/handler/fastcgi.rb:23:in `run'
    from /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:946:in `run!'
    from /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/main.rb:25
    from dispatch.fcgi:17

I have no idea what this means and I have tried many different things to fix it but nothing I tried seemed to work. My dispatch.fcgi is the following

#!/usr/bin/ruby

require 'rubygems'
require 'sinatra'

fastcgi_log = File.open("fastcgi.log", "a")
STDOUT.reopen fastcgi_log
STDERR.reopen fastcgi_log
STDOUT.sync = true

set :logging, false
set :server, "FastCGI"

load 'simple.rb'

And finally, my .htaccess (fcgid is how my host told me to set it up)

RewriteEngine on

AddHandler fcgid-script .fcgi
Options +FollowSymLinks +ExecCGI
RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]

© Stack Overflow or respective owner

Related posts about ruby

Related posts about sinatra