Refactored rails_rce to support rails2 and rails3.