透过Rubysource了解Ruby真理

Ruby语言的出现,为编程人员提供了一个愉悦的编程环境。在这里我们就通过一段简单的Ruby source,来看看Ruby语言的基本概念。#t#

1 从rubyforge下载1.85版的src,解压缩文件到指定目录下。

2 环境准备:我是WindowXp(sp2 jp)+ Cygwin

3 然后打开指定目录下解压缩的readme文件,按照步骤运行命令。

  1. * How to compile and install  
  2. This is what you need to do to compile 
    and install Ruby:  
  3.  
  4. 1. If ./configure does not exist or is older 
    than configure.in,  
  5. run autoconf to (re)generate configure.  
  6.  
  7. 2. Run ./configure, which will generate 
    config.h and Makefile.  
  8.  
  9. 3. Edit defines.h if you need. Usually 
    this step will not be needed.  
  10.  
  11. 4. Remove comment mark(#) before the 
    module names from ext/Setup (or  
  12. add module names if not present), 
    if you want to link modules  
  13. statically.  
  14. If you don't want to compile non 
    static extension modules  
  15. (probably on architectures which does 
    not allow dynamic loading),  
  16. remove comment mark from the
     line "#option nodynamic" in  
  17. ext/Setup.  
  18.  
  19. 5. Run make.  
  20.  
  21. 6. Optionally, run 'make test' to check
     whether the compiled Ruby  
  22. interpreter works well. If you see 
    the message "test succeeded",  
  23. your ruby works as it should (hopefully).  
  24.  
  25. 7. Run 'make install'  
  26. You may have to be a super user to install ruby. 

编译成功,在usr/local/下面生成了编译后的文件。


本文题目:透过Rubysource了解Ruby真理
网站路径:http://www.hxwzsj.com/article/djpppcc.html

其他资讯

Copyright © 2025 青羊区翔捷宏鑫字牌设计制作工作室(个体工商户) All Rights Reserved 蜀ICP备2025123194号-14
友情链接: 手机网站制作 教育网站设计方案 定制网站建设多少钱 网站建设方案 网站设计 成都营销网站建设 成都网站建设 商城网站建设 网站制作公司 手机网站制作 重庆企业网站建设 外贸网站建设 成都网站制作 重庆网站设计 成都网站建设公司 网站制作 成都网站制作 成都网站建设 成都网站设计 定制网站设计 网站建设 网站设计