rails3 部署方案

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要差些。不过也够用.....







评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值