首页
文章
活动
博客
图书
招聘
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
该文章对我有帮助
484°
/
4843 人阅读
/
0 条评论
发表评论
请
登录
后发表评论
王少平
访客 31038
王少平
的其他博文
更多
Cygwin下运行shell脚本
在CentOS 5上安装Git教程
centos 内核升级(2.6.18-194.el5升2.6.30)
在windows中用shell命令
CentOS insatll VMware tools
CentOS挂载xp共享
【转】用 VirtualBox 安裝 Android-x86 4.0
ruby time
多台机器用一套键鼠
MySql错误代码1045的解决方案