編輯Ruby代碼,你需要RubyMode,<link rel="stylesheet" type="text/css" href="http://maomaode.bokeland.com/plugins/plogeshi/styles/plogeshi.css">正如他所說,這個plugin已經包含在了ruby的發行版本里面,你可以在/misc下找到, 複製到你的emacs/lisp目錄下, 並且修改.emacs, 如下:
(setq load-path (cons "c:/bin/emacs/lisp/ruby" load-path)) (autoload 'ruby-mode "ruby-mode" "Mode for editing ruby source files" t) (setq auto-mode-alist (append '((".rb$" . ruby-mode)) auto-mode-alist)) (setq interpreter-mode-alist (append '(("ruby" . ruby-mode)) interpreter-mode-alist)) (autoload 'run-ruby "inf-ruby" "Run an inferior Ruby process") (autoload 'inf-ruby-keys "inf-ruby" "Set local key defs for inf-ruby in ruby-mode") (add-hook 'ruby-mode-hook '(lambda () (inf-ruby-keys) ))
如果你要安裝Rails插件, 可以參考這篇文章, 注意,你必須升級到emacs22以上纔可以
修改.emacs配置如下:
(setq load-path (cons "c:/bin/emacs/lisp/emacs-rails" load-path)) (require 'rails)
二. 參考書目
Programming Ruby Why’s (Poignant) Guide to Ruby一本漫畫ruby的書 From Java To Ruby管理者必讀 Rolling with Ruby on Rails Agile Web Development with Rails這本書廢話真的很多,700頁,可以壓縮到100頁 Enterprise.Integration.with.Ruby Road to Rails 不錯的在線PPT, 容易上手 Starting Ruby on Rails: What I Wish I Knew Top 12 Ruby on Rails Tutorials Ruby Tutorial 推薦閱讀 74 Quality Ruby on Rails Resources and Tutorials