rails 2.1でGetText-Packageがうまく動きません

先日購入した「Rails of Ruby on Rails」のサンプルを実行しているんだけど、以下のエラーが出て、gettextを使用したサンプルがうまく動かない。


/Users/ttokano/NetBeansProjects/locus/app/controllers/application.rb:7: undefined method `init_gettext' for ApplicationController:Class (NoMethodError)

私のマシンのRailsのバージョンを2.1に上げたのが理由みたいです。

とりあえず、Edge Rails and gettext: undefined method file_exists? (NoMethodError)を参考して、config/initializers/gettext.rbを作成し、以下のコードを記述しました。

require 'gettext/rails'
module ActionView
  class Base
    delegate :file_exists?, :to => :finder unless respond_to?(:file_exists?)
  end
end
Rails of Ruby on Rails ~Case of LOCUSANDWONDERS.COM~
Plan de Sens 清水 智雄
毎日コミュニケーションズ
売り上げランキング: 270458
このエントリーをはてなブックマークに追加
Share on Facebook
Post to Google Buzz
Bookmark this on Yahoo Bookmark
Bookmark this on Livedoor Clip
Share on FriendFeed
Share on StumbleUpon
Share on GREE
Bookmark this on Delicious
Post to Twitter

  1. コメントはまだありません。

  1. トラックバックはまだありません。