Rails + Lighttpd + FastCGI の環境を構築しようとしています。
サーバーは Fedora Core 6です。
まずは yumを使ってlighttpdと、lighttpd用のfastcgiを導入
yum install lighttpd lighttpd-fastcgiで、ruby用のfcgiをインストール しようと、
yum install ruby-develをしてから、
gem install fcgiとした所、
#gem install fcgi
Building native extensions. This could take a while...
ERROR: While executing gem ... (Gem::Installer::ExtensionBuildError)
ERROR: Failed to build gem native extension.
ruby extconf.rb install fcgi
checking for fcgiapp.h... no
checking for fastcgi/fcgiapp.h... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/bin/ruby
--with-fcgi-dir
--without-fcgi-dir
--with-fcgi-include
--without-fcgi-include=${fcgi-dir}/include
--with-fcgi-lib
--without-fcgi-lib=${fcgi-dir}/lib
Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/fcgi-0.8.7 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/fcgi-0.8.7/ext/fcgi/gem_make.out
とエラーになってしまいました。
さてどうしたものか。。。
単に、FastCGIがインストールされていませんでした。
wget http://www.fastcgi.com/dist/fcgi-2.4.0.tar.gz tar xzvf fcgi-2.4.0.tar.gz ./configure make make install
でインストール完了
そしてもう一度、
gem install fcgiあっさり成功
lighttpd.confを
[RAILS_ROOT]/config/
に作成して、
script/serverで無事に成功