Rails Tips #001
Posted by Steve | Filed under RoR
Rails 2.0.1 已經正式推出了,而我也把我的 development machine update 到 2.0.1,但假如現在要 create 一個新的 Rails project,但又要用回 Rails 的舊版本如 1.2.6,應該怎麼辦呢?
做法很簡單,只要 create 新的 project 時指定版本即可
$ rails _1.2.6_ dummy_app
Rails 2.0: Cannot freeze gems problem
Posted by Steve | Filed under RoR
Update 10/12/2007 : It’s fixed in edge changeset 8336, it make rails:freeze:gems work with RubyGems 0.9.5. You can update to edge or follow the change set to update your frameworks.rake
When I try to create my own Rails 2.0 API documentation for reference. I encounter the cannot freeze gems problem. After a little googling, I’ve found the temporary fix. Until there is a solution I’ll stick with this fix.
1. create a dummy_app
rails dummy_app
2. edit /Library/Ruby/Gems/1.8/gems/rails-2.0.1/lib/tasks/framework.rake, add the following below line 6
[original]
line 6: require ‘rubygems’[Fix]
line 6: require ‘rubygems’
line 7: require ‘rubygems/gem_runner’
3. delete the empty directory under vendor directory
4. rake rails:freeze:gems
5. echo >vendor/rails/activesupport/README
6. rake doc:rails
7. There is no step 7.
Rails 2.0 Released
Posted by Steve | Filed under RoR
經過差不多一年的 Development effort,Rails 2.0 終於正式推出,Rails 2.0比上一版本 Rails 1.2改善了很多,例如 RESTful 的語法,Action Pack: Multiple View,Active Record 速度上的改進,更簡易的 Active Record: Migration,ActionController::HttpAuthentication 等。
詳情可以到 Rails 的 blog 看看。相信很多的 Rails 書也要跟著改版了,我想 AWDR 也很快會出第三版。
Rails 2.0 RC2 and Rails 1.2.6
Posted by Steve | Filed under RoR, Ruby
Rails Updated to 1.2.6, 1.2.6 is the stable version.
Rails 2.0 RC2 released, if there is no major issue in this version, Rails 2.0 will be released in a week or two.
Rails 2.0 Release Candidate 1
Posted by Steve | Filed under RoR
Prototype 及 Script.aculo.us 剛剛推出了新的版本不夠兩日,就推出了 Rails 2.0 Release Candidate 1由 GemRails 升級到 EdgeRails,只要在你的 Rails Application Directory 打入
$ rake rails:freeze:edge TAG=rel_2-0-0_RC1
Rails 2.0 RC1 已包括了最新的 Prototype 及 Script.aculo.us。我想年底前應該就可以推出 Rails 2.0 的正式版本。
看到 Rails , Active Record 及 Active Support 等的版本是 1.99.0 就表示已經成功upgrade 到 EdgeRails(Rails 2.0 RC1) 囉﹗
Prototype 1.6 and Script.aculo.us 1.8
Posted by Steve | Filed under RoR
Prototype 及 Script.aculo.us 剛剛推出了新的版本,分別是Prototype 1.6 及 Script.aculo.us 1.8,我想到 Ruby on Rails 推出 2.0 版本時應該會把 Prototype 及 Script.aculo.us 升級到這兩個版本。
升級到 Mac OS X 10.5 Leopard
Posted by Steve | Filed under Apple, OS X, RoR
剛剛升級到 Mac OS X 10.5 Leopard
升級到 Mac OS X 10.5 Leopard 的成本︰
| Mac OS X 10.5 Leopard | HKD | 1,000.00 |
| iLife 08 | HKD | 590.00 |
| 總數 | HKD | 1,590.00 |

Leopard 預設已經安裝了 Ruby,Rails 等,但最近 Rails 推出了 1.2.4 及 1.2.5 兩個 bugfix 版本,所以要人手 update Rails。
$ gem update rails

Ruby On Rails Essential Training
Posted by Steve | Filed under RoR, Ruby
今天終於收到了Lynda.com的Ruby On Rails Essential Training的CD了。包括有兩隻CD-Roms,總共有10.75小時的training video。
引述 XDite 的評語:這部影片講解得太好了。從 RoR 的設計理念、架構開始講,接著帶你從 model、controller、view,對 database 的 migrate 一步一步來,最後目的是實做一個商店。雖然每本書最前面都會一兩章講基礎架構,但都只是草草帶過。這部影片裡,光帶領新手理解 C / R / U / D 的 controller 到底必須怎麼撰寫運作,我就覺得非常值得稱許。它在令新手往往迷惘的地方講解的非常清楚與透徹。所以我推薦它應該成為新手的入門磚。
希望看完後能夠對 RoR 有更深入了解,寫 RoR 起來能夠得心應手,當然 AWDR 也是新手入門的不可缺少的一本書。
Steve 2.5開發中
Posted by Steve | Filed under Project
為什麼是Steve 2.5而不是3.0呢?因為這是一個小project,先試牛刀,這個projec已經計劃了一陣子,但因為種種原因而遲遲未開始,希望儘快完成。Project name叫做homeXpenses。
在 CentOS 5 上安裝 Oracle 11g
Posted by Steve | Filed under CentOS, Oracle, Server, Steve's Notebook
由於Oracle 11g現在只有x86版本,所以雖然Mac Mini是使用Core 2 Duo的Processor(Core 2 Duo是一顆64bit的processor,可以安裝x86-64版的CentOS 5),所以我之前所安裝的CentOS 5只是x86版本,而且我的Mac Mini只有2GB的memory,所以32bit或64bit都沒有大分別。
Download Oracle 11g x86 版本
首先到 http://www.oracle.com download Oracle 11g,Oracle 11g已經長大到1.7GB,一個zip file就包含了Documents,Client,Examples,Gateways及Clusterware,所以如果沒有DVDRW,就不大方便。(今時今日,我想這不是問題吧﹗)Download完成後再用chksum算一算,沒有錯誤後就可以unzip及把它燒錄成DVD備用。
安裝前準備
Install
安裝Oracle 11g Enterprise Edition
Install

