Ruby 板


LINE

环境: ------------------------------------- 作业系统:一开始用 Vista 安装,後来改用 WinXP Ruby 1.8.6-26 和 1.8.6-27RC2 先前己安装 WLMP-Standard-1.1.5.1169-Win32-HUN.exe mysql-gui-tools-5.0-r14-win32.msi ------------------------------------- 状况: ------------------------------------- 目标:写一个 Hello World 的程式 【状况1:安装 1.8.6-26时】 1.执行 ruby186-26.exe 2.gem install rails --include-dependencies 3.gem install mongrel --include-dependenc 4.gem install mongrel_service --include-dependencies 5.rails -d mysql C:\www 6.cd C:\www 7.mongrel_rails service::install -N Mongrel -c C:\www -p 81 -e production 8.起动 Mongrel Services 结果:port 81 并没有起动 => netstat -an -p tcp 没看到 port81 有开 处理: 1. gem update --system 2. gem update 结果: 执行 mongrel_rails service::install -N Mongrel -c C:\www -p 81 -e production 後,出现下列的错误讯息: c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31: in `gem_original_require': no such file to load --c:/ruby/lib/ruby/ gems/1.8/gems/mongrel_service-0.3.4-x86-mswin32/lib/mongrel_serv ice/init.rb (LoadError) from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from c:/ruby/lib/ruby/gems/1.8/gems/gem_plugin-0.2.3/lib/gem_plugin.rb:1 34:in `load' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:203:in `each' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:203:in `each' from c:/ruby/lib/ruby/gems/1.8/gems/gem_plugin-0.2.3/lib/gem_plugin.rb:1 12:in `load' from c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32 -60/bin/mon grel_rails:278 from c:/ruby/bin/mongrel_rails:16:in `load' from c:/ruby/bin/mongrel_rails:16 处理:改 1.8.6-27rc2 => 【进入状况2】 【状况2:安装 1.8.6-27rc2】 1.执行 ruby186-27rc2.exe 2.gem install rails --include-dependencies 3.gem install mongrel --include-dependenc 4.gem install mongrel_service --include-dependencies 5.rails -d mysql C:\www 6.cd C:\www 7.mongrel_rails service::install -N Mongrel -c C:\www -p 81 -e production 8.启动 Mongrel Services 9.ruby script/generate controller helloworld index 10.编辑 c:\www\app\controllers\helloworld_controller.rb 加入 render :text => "Hello World!" 11.重新启动 Mongrel Services 12.开启 IE,输入 http://localhost/helloworld 13.网页错误 「no such file to load -- mysql」 ﹙图片网址如下﹚ http://0rz.tw/965a5 处理: gem update --system (有做没做都会出现後来的错误) gem update (有做没做都会出现後来的错误) gem install mysql 结果: (1)在 gem install mysql 时,出现下列错误 Successfully installed mysql-2.7.3-x86-mswin32 1 gem installed Installing ri documentation for mysql-2.7.3-x86-mswin32... Installing RDoc documentation for mysql-2.7.3-x86-mswin32... ERROR: While generating documentation for mysql-2.7.3-x86-mswin32 ... MESSAGE: Unhandled special: Special: type=17, text="<!-- $Id: README.html, v 1.20 2006-12-20 05:31:52 tommy Exp $ -->" . RDOC args: --op C:/Ruby/lib/ruby/gems/1.8/doc/mysql-2.7.3-x86-mswin32/rdoc - -exclude ext --main README --quiet ext README docs/README.html (continuing with the rest of the installation) (2)输入 http://localhost:81/helloworld 网页出现另一个错误 126: - C:/Ruby/lib/ruby/gems/1.8/gems/mysql-2.7.3-x86-mswin32/ext/mysql.so ﹙图片网址如下﹚ http://0rz.tw/fa5aO ------------------------------------- 附录: ------------------------------------- ------------------------------------- 我是照书本上的方法操作的,安装方式同 http://bluework.bokee.com/viewdiary.41182899.html 都是用 Mongrel + MYSQL ﹙不过我还没装 NetBeans﹚ 不晓得小弟是那个步骤有问题?还是各位高手大大指导 ~ --



※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 114.137.51.187
1F:→ cuteman0725:抱歉...临时有事,晚上会再回来看各位的指导 12/07 17:32







like.gif 您可能会有兴趣的文章
icon.png[问题/行为] 猫晚上进房间会不会有憋尿问题
icon.pngRe: [闲聊] 选了错误的女孩成为魔法少女 XDDDDDDDDDD
icon.png[正妹] 瑞典 一张
icon.png[心得] EMS高领长版毛衣.墨小楼MC1002
icon.png[分享] 丹龙隔热纸GE55+33+22
icon.png[问题] 清洗洗衣机
icon.png[寻物] 窗台下的空间
icon.png[闲聊] 双极の女神1 木魔爵
icon.png[售车] 新竹 1997 march 1297cc 白色 四门
icon.png[讨论] 能从照片感受到摄影者心情吗
icon.png[狂贺] 贺贺贺贺 贺!岛村卯月!总选举NO.1
icon.png[难过] 羡慕白皮肤的女生
icon.png阅读文章
icon.png[黑特]
icon.png[问题] SBK S1安装於安全帽位置
icon.png[分享] 旧woo100绝版开箱!!
icon.pngRe: [无言] 关於小包卫生纸
icon.png[开箱] E5-2683V3 RX480Strix 快睿C1 简单测试
icon.png[心得] 苍の海贼龙 地狱 执行者16PT
icon.png[售车] 1999年Virage iO 1.8EXi
icon.png[心得] 挑战33 LV10 狮子座pt solo
icon.png[闲聊] 手把手教你不被桶之新手主购教学
icon.png[分享] Civic Type R 量产版官方照无预警流出
icon.png[售车] Golf 4 2.0 银色 自排
icon.png[出售] Graco提篮汽座(有底座)2000元诚可议
icon.png[问题] 请问补牙材质掉了还能再补吗?(台中半年内
icon.png[问题] 44th 单曲 生写竟然都给重复的啊啊!
icon.png[心得] 华南红卡/icash 核卡
icon.png[问题] 拔牙矫正这样正常吗
icon.png[赠送] 老莫高业 初业 102年版
icon.png[情报] 三大行动支付 本季掀战火
icon.png[宝宝] 博客来Amos水蜡笔5/1特价五折
icon.pngRe: [心得] 新鲜人一些面试分享
icon.png[心得] 苍の海贼龙 地狱 麒麟25PT
icon.pngRe: [闲聊] (君の名は。雷慎入) 君名二创漫画翻译
icon.pngRe: [闲聊] OGN中场影片:失踪人口局 (英文字幕)
icon.png[问题] 台湾大哥大4G讯号差
icon.png[出售] [全国]全新千寻侘草LED灯, 水草

请输入看板名称,例如:iOS站内搜寻

TOP