Rails 1.2.1
2007-01-19
Rails の 1.2 が出たらしい。 アップデートしてみる。
$ sudo gem update rails
Upgrading installed gems...
Updating Gem source index for: http://gems.rubyforge.org
Attempting remote upgrade of rails
Attempting remote installation of 'rails'
Install required dependency activesupport? [Yn] Y
Install required dependency activerecord? [Yn] Y
Install required dependency actionpack? [Yn] Y
Install required dependency actionmailer? [Yn] Y
Install required dependency actionwebservice? [Yn] Y
Successfully installed rails-1.2.1
Successfully installed activesupport-1.4.0
Successfully installed activerecord-1.15.1
Successfully installed actionpack-1.13.1
Successfully installed actionmailer-1.3.1
Successfully installed actionwebservice-1.2.1
Installing RDoc documentation for activesupport-1.4.0...
CHANGELOG をみると 1.2 では文字コードが UTF-8 前提らしい。
* Set $KCODE to 'u' by default to enable the multibyte safe String#chars proxy. [Koz]
確認してみる。
$ rails1.2.1/script/console
Loading development environment.
>> RAILS_GEM_VERSION
=> "1.2.1"
>> $KCODE
=> "UTF8"
$ rails1.1.6/script/console
>> RAILS_GEM_VERSION
=> "1.1.6"
>> $KCODE
=> "NONE"
https://www.amazon.co.jp/dp/4774130036
WEB+DB PESS Vol.36 の先取り Rails 1.2 を読むと、他の大きな変更点は、 Accept ヘッダによる出力形式の切り替え (HTML を返したり XML を返したり) とか、 map.resource を使った REST 対応があるらしい。 時間ができたら、試してみよう。