component_initでActiveRecord関連のエラー(load_missing_constant)
以下のようなエラーが発生してた。
C:\work\NetBeans65\bizca>ruby script\component_init hoge C:/work/NetBeans65/bizca/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:263:in `load_missing_constant': uninitialized constant Hoge::HogeReviewBugCount (NameError) from C:/work/NetBeans65/bizca/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependenc ies.rb:452:in `const_missing' from ./script/../config/../install/hoge/_install/db/101_hoge_schema_101.rb:312:in `real_up' (以下略)
該当ソースは、モデルをcreateするところ。
Hoge::HogeReviewBugCount.create( :dts_pjdata_project_id => pj.id, :dts_pjdata_review_bug_category_id => tmp_id, :count => rbc_count[i] )
間違っているように見えないけど。。。 モデルの関連とかも間違ってないようだし。。
結論:modelのファイル名が間違ってた。
(正)hoge_review_bug_count
(誤)hoge_reviewe_bug_count
......orz