免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3191 | 回复: 1

Installing rails on Windows7 [复制链接]

论坛徽章:
0
发表于 2012-03-12 22:26 |显示全部楼层

Installing rails on Windows7









按照官网安装

Install steps:
1.install ruby
  安装RubyInstaller
2.install rails
Windows Start ! Run..., enter cmd, and click OK.



Java代码
  1. 1.C:\Ruby193\bin\gem install rails  
复制代码
3.install sqlite3
下载
• Command-line shell for accessing and modifying SQLite databases
• DLL of the SQLite library
解压并拷贝C:\Ruby193\bin下,然后:



Java代码
  1. 1.gem install sqlite3  
复制代码
4.建立一个工程



Java代码
  1. 1.cd work  
  2. 2.rails new demo  
  3. 3.rails server(没有其它web server情况下,有则rails server webrick)  
复制代码
访问:http://localhost:3000.

问题一:
Installing ri documentation for i18n-0.6.0...
unable to convert U+00E4 from UTF-8 to GBK for lib/i18n/tests/interpolation.rb,
skipping
unable to convert "\xC2" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to GBK
for lib/i18n.rb, skippingInstalling on Windows

原因是没有安装:Development-Kit
下载地址:https://github.com/oneclick/rubyinstaller/wiki/Development-Kit
安装步骤:



Java代码
  1. 1.1.Extract Files <DEVKIT_INSTALL_DIR>  
  2. 2.2.cd <DEVKIT_INSTALL_DIR>  
  3. 3.3.ruby dk.rb init to generate the config.yml  
  4. 4.4.edit the generated config.yml(查看是否包含已安装的ruby,没有则手动添加)  
  5. 5.5.ruby dk.rb review  
  6. 6.6.ruby dk.rb install  
  7. 7.7.gem install rdiscount --platform=ruby  (这一步是测试是否安装成功)  
  8. 8.emporarily enhancing PATH to include DevKit...  
复制代码
安装成功后在重新在工程目录下Bundle install,例如:C:\Ruby193\work\demo\Bundle install

论坛徽章:
0
发表于 2012-03-12 22:26 |显示全部楼层
谢谢分享
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP