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~
posted with amazlet at 09.12.21
Plan de Sens 清水 智雄
毎日コミュニケーションズ
売り上げランキング: 270458
毎日コミュニケーションズ
売り上げランキング: 270458
コメントはまだありません。