1

作成した既存のエンジンにドロップダウン フィールドを追加しようとしています。このガイドhttp://refinerycms.com/guides/multiple-resources-in-an-extensionに従い、コマンドを実行したときrails g refinery:engine categories name:string --extension group_classes

次に実行bundle installしてみrails generate refinery:group_classesましたが、次のエラーが発生しました。 rake aborted! Multiple migrations have the version number 1

vender/extensions/group_classes/db/migrate フォルダーの移行を調べたところ、どちらも接頭辞が 1 でした。カテゴリの接頭辞を 2 に変更し、すべてを再実行したところ、機能しましたが、実行しようとするとrake db:seed、このエラーが発生しました。 : rake aborted! uninitialized constant Refinery::GroupClasses::Engine

完全なスタック トレース:

** Invoke db:seed (first_time)
** Execute db:seed
** Invoke db:abort_if_pending_migrations (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:abort_if_pending_migrations
rake aborted!
uninitialized constant Refinery::GroupClasses::Engine
/var/www/vhosts/tomstestsite.us/PersonalTrainingKT/db/seeds.rb:46:in `<top (required)>'
/var/www/vhosts/tomstestsite.us/PersonalTrainingKT/refinerycms/ruby/1.9.1/gems/railties-3.2.6/lib/rails/engine.rb:520:in `load_seed'
/var/www/vhosts/tomstestsite.us/PersonalTrainingKT/refinerycms/ruby/1.9.1/gems/activerecord-3.2.6/lib/active_record/railties/databases.rake:309:in `block (2 levels) in <top (required)>'
/usr/local/rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/usr/local/rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/usr/local/rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/usr/local/rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/usr/local/rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/usr/local/rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/usr/local/rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/usr/local/rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/usr/local/rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/usr/local/rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
/usr/local/rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/usr/local/rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
/usr/local/rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/usr/local/rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/usr/local/rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
/usr/local/rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/usr/local/rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/usr/local/rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
/usr/local/rvm/gems/ruby-1.9.3-p125/bin/rake:19:in `load'
/usr/local/rvm/gems/ruby-1.9.3-p125/bin/rake:19:in `<main>'
Tasks: TOP => db:seed

これは何が原因でしょうか?

4

1 に答える 1

1

または、サーバーを --extension group_classes再起動しようとしますか?

于 2012-09-04T05:04:16.683 に答える