rails的部署 网上的方案很多。尤其是 robbin的先前写的方案(08年写的)。
不过,到了rails3 的时代, 发现 lighttpd + fastcgi 这个方案已经被 out 出局了。
rails3 不再支持 cgi的模式了。可以参考 http://weblog.rubyonrails.org/2009/4/17/this-week-in-edge-rails/
Removed: CGI Support
Rails 3 will not support direct CGIdispatching. This was deprecated in Rails 2.3, so it should be no surprise toanyone that it’s being removed entirely. If you need to use CGIfor some reason, though, remember that it’s still supported through Rack.
另外一种部署方案 nginx + mongrel, 目前也被抛弃了(原因是没人维护了,在rails3 之后不好用了)
http://en.wikipedia.org/wiki/Mongrel_%28web_server%29
After the original author Zed Shaw leftthe Rubyon Rails-scene[4]the releases of Mongrel stopped. The current release 1.1.5 is no longer able toinstall in Ruby versions higher than 1.9.2 which is recommended for Rails 3[5],the fix is to use the much older 1.2.0-pre2[6]release of Mongrel which isn't stable.
Mongrel however lives on in a new project called Thin[7]which is a maintained project that uses the Mongrel parser.
不过有个替代方案就是, nginx +thin的方案。因为thin 就采用了 mongrel了,它继续维护mongrel的模块了,并且性能还比mongrel好。呵呵,这也许就是开源的魅力所在。最开始的方案,慢慢被其他人采用,然后就可以推陈出新,青胜于蓝...
目前推荐的主流部署方案:
1. nginx + unicorn
http://unicorn.bogomips.org/
据说nginx + unicorn 的性能比 nginx + thin 要好很多. 但只支持unix系统,不支持windows,网上看到有人通过cygwin来安装2. nginx + thin
可以同时支持 windows /unix. 性能稍微比nginx+unicorn要差些。不过也够用.....