透过Ruby source了解Ruby真理
创始人
2024-06-16 12:41:16
0

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/下面生成了编译后的文件。
 

相关内容

热门资讯

如何允许远程连接到MySQL数... [[277004]]【51CTO.com快译】默认情况下,MySQL服务器仅侦听来自localhos...
如何利用交换机和端口设置来管理... 在网络管理中,总是有些人让管理员头疼。下面我们就将介绍一下一个网管员利用交换机以及端口设置等来进行D...
施耐德电气数据中心整体解决方案... 近日,全球能效管理专家施耐德电气正式启动大型体验活动“能效中国行——2012卡车巡展”,作为该活动的...
20个非常棒的扁平设计免费资源 Apple设备的平面图标PSD免费平板UI 平板UI套件24平图标Freen平板UI套件PSD径向平...
Windows恶意软件20年“... 在Windows的早期年代,病毒游走于系统之间,偶尔删除文件(但被删除的文件几乎都是可恢复的),并弹...
德国电信门户网站可实时显示全球... 德国电信周三推出一个门户网站,直观地实时提供其安装在全球各地的传感器网络检测到的网络攻击状况。该网站...
为啥国人偏爱 Mybatis,... 关于 SQL 和 ORM 的争论,永远都不会终止,我也一直在思考这个问题。昨天又跟群里的小伙伴进行...
《非诚勿扰》红人闫凤娇被曝厕所... 【51CTO.com 综合消息360安全专家提醒说,“闫凤娇”、“非诚勿扰”已经被黑客盯上成为了“木...