[安装RoR:可以直接安装一步到位的Instans Rails;
或者:
下载安装Ruby<ruby-lang.org>,下载安装Rails和Rails依赖包(ActionSupport、ActionRecord、ActionMailer、ActionWebService、ActionPack、Rake。注意:最好先查看Rails的发布日志中需要的各依赖包的版本。当然,如果网速Ok的话,直接gem install rails -y就不用你辛苦下了,不过呢,自己下,自己安装,总比较明白点)<rubyForge.org>]
默认的RoR服务器是WEBrick,改~~~看下面
[来自:http://hi.baidu.com/magiclin/blog/item/116596a82c8bcbb5cb130c3a.html]
什么是Mongrel?
一个快速的Web Server,速度快于WEBrick甚多,网络上的介绍很多。
什么是Lighttpd?
用于转发request到a cluster of Mongrel,网络上的介绍同样很多。
使用它们可以解决Rails在request上面出现的问题。
一、首先从rubyforge网站下载One-Click Ruby Install,运行安装程序,就安装好了ruby和rubygems。
配置Lighttpd,配置port:
打开c:\lighttpd\conf\lighttpd-inc.conf
取消 server.port = 81 前的注释,你也可以使用port:80
开启模块,其他模块不要乱开,会出问题
server.modules = ("mod_proxy",
"mod_rewrite",
"mod_accesslog",
"mod_alias" )
另外在这个配置文件末位加上:
proxy.debug = 0
proxy.balance = "fair"
proxy.server = ( "/" =>
( "host" => "127.0.0.1", "port" => 3000),
( "host" => "127.0.0.1", "port" => 3001 )
)
这里的port就是Mongrel server的port,启动Lighttpd使用命令:
c:\lighttpd\lighttpd.exe -f conf\lighttpd-inc.conf -m lib
也可以直接运行c:\lighttpd\Start-LightTPD.bat
通过http://localhost:81/depot 或http://(服务器的IP地址或完整的计算机名称):81/depot就可以成功访问