Wednesday, March 25, 2009

Rails on FreeBSD 7.1

Today I was first time trying to install rails on freebsd 7.1. Neither the ports version nor the gem file version, rails could not work, even only simply creating a new project. It returns message as following.

undefined method `camelize' for "app":String

I had try to reinstall ruby, rubygem, and try other version rails but a nonsense. And finally I forgot how did I discover it needs ruby-iconv ports in fact. It seems occurring at the time I was using rails 2.2.2, some keyword appeared in the error message.

One post on the mailing list [Ruby on Rails : Talk] show the same problem. If you also have the same problem, try it.


Saturday, March 14, 2009

REPL in Perl

Read-Evaluate-Print Loop 在現代語言中非常常見,諸如 Scheme, Haskell, Ruby, 與 Python 都有內建,實際工作時是非常實用的工具,Perl 6 也即將內建 REPL Shell,Perl 5 則沒有。

這幾天偶然想在 Perl 中使用 REPL,搜尋了一下,在 得到 2007 年發表的這篇文章,介紹了四個以 Perl 5 實做的 REPL Shell,翻譯如下。

Continue reading REPL in Perl.


Monday, March 2, 2009

two pragmatic commands

$ cp /some/path/to/myfile{,.back} # cp-the-file

$ mv filename.{old,new} # quickly-rename-a-file