惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

罗磊的独立博客
SecWiki News
SecWiki News
酷 壳 – CoolShell
酷 壳 – CoolShell
爱范儿
爱范儿
量子位
M
MIT News - Artificial intelligence
GbyAI
GbyAI
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
TaoSecurity Blog
TaoSecurity Blog
博客园 - 【当耐特】
H
Heimdal Security Blog
腾讯CDC
The Last Watchdog
The Last Watchdog
Security Archives - TechRepublic
Security Archives - TechRepublic
Hacker News: Ask HN
Hacker News: Ask HN
S
Schneier on Security
Microsoft Security Blog
Microsoft Security Blog
WordPress大学
WordPress大学
博客园 - 司徒正美
Recent Commits to openclaw:main
Recent Commits to openclaw:main
C
Cybersecurity and Infrastructure Security Agency CISA
S
SegmentFault 最新的问题
大猫的无限游戏
大猫的无限游戏
Application and Cybersecurity Blog
Application and Cybersecurity Blog
F
Full Disclosure
有赞技术团队
有赞技术团队
T
Tailwind CSS Blog
Engineering at Meta
Engineering at Meta
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
T
Threatpost
月光博客
月光博客
A
Arctic Wolf
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
雷峰网
雷峰网
T
Troy Hunt's Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
The Cloudflare Blog
D
DataBreaches.Net
O
OpenAI News
L
LINUX DO - 最新话题
宝玉的分享
宝玉的分享
小众软件
小众软件
V
Vulnerabilities – Threatpost
A
About on SuperTechFans
人人都是产品经理
人人都是产品经理
T
The Exploit Database - CXSecurity.com
Martin Fowler
Martin Fowler
美团技术团队
P
Privacy International News Feed

博客园 - buru

django begining Update 两个表之间更新数据问题 用户控件与应用页面的事件顺序 linq小问题总结 “尝试读取或写入受保护的内存”错误处理 firefox浏览器的默认事件 通过c#和ironruby学习 ruby语言 SQL 语句查询与性能 操作Access数据库碰到的几个问题 asp.net的CodeDom zz天涯-关于职业生涯的 一个线程管理器 zz两个存储过程 看《C#线程参考手册》 Mediator 中介者模式 让firefox支持IE的一些属性 IE与firefox取得事件对象的函数(zz) proxy模式 c#通过url获取文件
配置rails运行环境
buru · 2008-11-18 · via 博客园 - buru

2008-11-18 00:25  buru  阅读(425)  评论()    收藏  举报

我用mongel

mongrel是一个ruby的HTTP库,用来寄舍ruby Web应用程序。其实不用Apache单用mongrel就可以运行RoR程序了,那篇网上教程中使用Apache是用来做Web代理,让网站不会有端口声明。我只是做做试验,多个端口号不会有什么影响,所以我只配了mongrel。
 配置步骤如下:
    1. 下载并安装Ruby
    2. 安装gem (Windows安装包安装的Ruby是自带gem的)
        2.1 到rubyforge下载gem
        2.2 解压gem档,并在命令行下执行setup: ruby setup.rb
    3. 安装rails
        3.1 命令行下输入: gem install rails –include-dependencies
         注: 请确认电脑有连接网络。这个安装过程会持续一段时间,视网速而定。
    4. 安装mongrel
        4.1 命令行下输入: gem install mongrel –y
        4.2 中间会提示安装什么版本,我安装的是最新版本的Win32版,其它版本我没试过
    5. 安装mongrel service
        5.1 命令行下输入: gem install mongrel_service -y
        5.2 中间会提示安装什么版本,我安装的是最新版本的Win32版,其它版本我没试过
        5.3 如果提示安装错误 mongel_service requires win32-service <>=0.5.2,<0.6.0,runtime> 则需要安装0.5.2版的win-service  :

             gem uninstall win32-service
             gem install win32-service -v '0.5.2'          
    6. 创建一个rails程序
        6.1 命令行下输入: rails D:\RailsRoot, rails就会自动创建所需要文件到目标目录下
        6.2 命令行下输入: mongrel_rails service::install -N railsdemo -c d:\railsdemo -p 8082 –e production
         -e参数还可以是development,-p参数是服务的端口号,-N参数是服务的名称
        6.3 现在Windows的服务列表中就会多一个railsdemo服务,启动它。rails 2.0.2修改了默认的数据库,所以还需要安装sqlite3
           gem install sqlite3-ruby 。如果出错,则参考http://www.javaeye.com/topic/264246
        6.4 到浏览器下测试站点 http://localhost:8082/ ,看到首页还不算完,点击”About your application’s environment”看看是否正常显示。 
    

    如果按以上步骤配置后,点首页的”About your application’s environment”,可以显示如下结果,那就算完成了:

Ruby version 1.8.6 (i386-mswin32)
RubyGems version 1.2.0
Rails version 2.1.2
Active Record version 2.1.2
Action Pack version 2.1.2
Active Resource version 2.1.2
Action Mailer version 2.1.2
Active Support version 2.1.2
Application root d:/RailsRoot
Environment development
Database adapter sqlite3
Database schema version 0

参考链接:
在Windows平台使用Apache2.2和Mongrel运行Ruby on Rails
Mongrel Home