首页
文章
活动
博客
图书
招聘
Search
登录
注册
WEBrick纯ruby的web服务器
2011-09-23
王少平
正确安装Ruby on Rails即可
创建文档run.rb,内容如下:
require 'webrick'
httpd=WEBrick::HTTPServer.new(
:DocumentRoot=>Dir::pwd+"/ruby",
:Port=>80
)
trap(:INT){httpd.shutdown}
httpd.start
运行run.rb,打开浏览器,输入地址:http://localhost,自己看一下吧。
0
该文章对我有帮助
488°
/
4882 人阅读
/
0 条评论
发表评论
请
登录
后发表评论
王少平
访客 31062
王少平
的其他博文
更多
celerity 1.7.0还是不能很好的处理iframe
centos 内核升级(2.6.18-194.el5升2.6.30)
MySql错误代码1045的解决方案
在CentOS 5上安装Git教程
【转】用 VirtualBox 安裝 Android-x86 4.0
SciTE中文问题
中国十大丑陋建筑
趣味问题
Aptana汉化
Aptana默认工作路径的修改