Ruby 程序员的挚友
历史背景[1]
诞生于1993年2月24日的Ruby(红宝石),由日本人松本行弘(Yuki Matsumoto)于1994年12月发布。 Ruby 作为一种纯面向对象的脚本程序设计语言,吸收了Smalltalk和Perl两种程序语言的特性。
Ruby理念[2]
1.首先考虑的是,减少编程时不必要的琐碎时间,令编写程序的人高兴;
2.其次是良好的界面设计;
3.强调系统设计必须人性化,而不是一味从机器的角度设想。
Linux中安装Ruby[3]
依赖于您所使用的Linux发行版本,有一些安装Ruby的方法。首选方法是简单地下载源代码并亲自编译。而在一些操作系统平台中,用安装包管理解决方法,可以极其简单地安装Ruby。
例如,在Debian或Ubuntu中apt-get工具提供了一种简易而优美的解决方案:
% sudo apt-get install ruby1.9.1-full
上述命令安装目前稳定的Ruby版本1.9.1。如果您喜欢安装Ruby1.8版本,您可以使用以下命令安装:
% sudo apt-get install ruby-full
程序示例
#!/usr/bin/env ruby
# hello.ry
puts "Hello, world!"
端中输入以下命令:
$chmod a+x hello.ry
$hello.ry
结果输出显示是:
Hello, world!
资源
Ruby官方网:http://www.ruby-lang.org/en/
Ruby正体中文网:http://www.ruby-lang.org/zh_TW/
Ruby简体中文网:http://www.ruby-lang.org/zh_cn/
Rails中Ruby程序设计指南:
http://www.meshplex.org/wiki/Ruby/Ruby_on_Rails_programming_tutorials
参考文献
1.维基百科http://zh.wikipedia.org/wiki/Ruby
2.Ruby官方网站http://www.ruby-lang.org/en/
相关文档:
1. ruby已成为1.87
2. 必须先安装安装光盘里的新的xcode,在"optional"目录里
3. 可能需要重新安装macport
http://trac.macports.org/wiki/Migration
4. 或者升级macport
http://weblog.rubyonrails.org/2009/8/30/upgrading-to-snow-leopard
$ sudo port selfupdate
$ sudo port sync
$ sudo port upgrade --force insta ......
喜欢玩阿月系列RPG游戏的我,跟不少童鞋一样下了RPGMakerXP来瞻仰一下。当时觉得这个软件太方便了,用鼠标随便点点就能弄出来个有趣的小游戏。因为里面不仅自带不少地图和人物行走图等素材,容易上手的操作方式也让自己大有成就感……可是游戏毕竟是离不开编程,解开游戏包,看 ......
To get it done is not easy. I spent a whole day to figure out the various compatibility issues along the way out.
Now there still might be potential issues, but it works by my rough test.
Step 1: Install Apache Cassandra
You may know that the Ruby gem cassandra will do it for you.
  ......
The following is improved version of the code created by David Mullet, from
http://rubyonwindows.blogspot.com/2007/03/ruby-ado-and-sqlserver.html
require 'win32ole'
class SqlServer
# This class manages database connection and queries
attr_accessor :connection, :data, :fields
attr_wr ......
最近由于学习使用linux下的C开发,需要查询Linux C函数参考,就经常上http://man.chinaunix.net/develop/c&c++/linux_c/default.htm查看,描述得比较详细而且还有例子。
网上还有许多各种技术的网页格式的参考材料都非常强大,可惜很多时候都没有网。于是就想写个脚本可以把文档下载,像android开发者文档一样弄到本地 ......