代碼如下:複製代碼 代碼如下:require 'date' day = Date.new(2008, 2, -1) end_of_month = day.strftime('%d').to_i year_and_month = day.strftime('%Y%m') for today in 1..end_of_month do p sprintf('%s%02d', year_and_month, today)
git倉庫輸出 git archive --format=tar --prefix=actasfavor/ HEAD | (cd /home/holin/work/ && tar xf -) 輸出到/home/holin/work/actasfavor/目錄下 Posted by holin At May 16, 2008 16:42 載入plugins中的controller和model # Include hook code here require
Ruby on Rails的介紹……跟.net沒啥關係……放首頁只是為了讓更多人接觸Ruby on Rails……明天撤下來……原文網址:http://www.blogwind.com/Wuvist/16993.shtml 順便說一下,我用的是Mac,部落格園使用的cute editor在Safari中成了一個text area,不過,cute editor的最新版已經在一定程度上相容Safari了…… 自從看了Ruby on
Ruby Require VS Load VS Include VS Extend總的來說:require vs load:require只載入一次庫,load可能多次載入,一般情況下用requireinclude vs extend:include的模組中的方法作為類的instance methods,extend的作為class methodsHere are the differences between Require, Load, Include and Extend methods:
1: I'm Sadek Drobi, I'm here at QCon with Matsumoto Yukihiro. Matz, can you tell us what you've been up to lately?Recently, I've been working on the version 1.9, which is the development version of Ruby, which is much faster than the stable version 1
上一篇中搭建了Ruby的開發環境,其實那是不完整的,因為僅安裝了Ruby的電腦,並不能真正進行Ruby開發,甚至連最基本的調試功能都不能使用,就像JAVA開發人員只安裝了JRE一樣。為了進行後續開發,我們需要安裝gem,但是在RubyMine中安裝Gem時會報如下錯誤:Please update your PATH to include build tools or download the DevKitfrom 'http://rubyinstaller.org/downloads' and