• 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31

TAG_rel_2-0-0_RC2をfreezeしたプロジェクトでDBを作成しようとしたところ、下記のエラーが。

   1  $ sudo rake db:create RAILS_ENV='production'
   2  (in /usr/local/foo)
   3  rake aborted!
   4  undefined method `whiny_protected_attributes=' for ActiveRecord::Base:Class
   5  
   6  (See full trace by running task with --trace)

同じことを言っている人がrubyonrails.comのコメントにもいて、ちゃんとJeremy Kemperが返事を書いています。
http://documentation.rubyonrails.com/2007/11/9/rails-2-0-release-candidate-1#comment-17936

delete the whiny_protected_attributes setting from your environement. It was in the preview release but is not in the release candidate, so if you generated an app with the preview and are now upgrading it, you’ll need to remove that line.

というわけでconfig/environments/production.rb内で下記をコメントアウトしました。

   1  # Disable raising errors when mass-assigning to a protected attribute
   2  # config.active_record.whiny_protected_attributes = false

すんなり解決。

posted by Png satoko on Mon 3 Dec 2007 at 11:23

Comments:

or Preview
Social Bookmarks
  • Delicious
  • B_entry240
  • Clip_16_12_w
Services from s21g
twpro(ツイプロ)
Twitterプロフィールを快適検索
地価2009
土地の値段を調べてみよう
MyRestaurant
自分だけのレストラン手帳
Formula
ブログに数式を埋め込める数式コミュニティ