コマンドおよびトレース:Rake:移行しようとすると表が存在しないと言っています....いいえ、それは存在しません。そのため、移行しようとしています。
% rake db:migrate RAILS_ENV=test --trace
(in /Users/lprestonsegoiii/Work/GravityLabs/TinderBox)
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
Mysql::Error: Table 'project.medias' doesn't exist: SHOW FIELDS FROM `medias`
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.8/lib/active_record/connection_adapters/abstract_adapter.rb:221:in `log'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.8/lib/active_record/connection_adapters/mysql_adapter.rb:323:in `execute'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.8/lib/active_record/connection_adapters/mysql_adapter.rb:470:in `columns'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.8/lib/active_record/base.rb:1301:in `columns'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.8/lib/active_record/base.rb:1314:in `column_names'
/Library/Ruby/Gems/1.8/gems/searchlogic-2.5.6/lib/searchlogic/named_scopes/ordering.rb:33:in `ordering_condition_details'
/Library/Ruby/Gems/1.8/gems/searchlogic-2.5.6/lib/searchlogic/named_scopes/ordering.rb:25:in `create_condition'
/Library/Ruby/Gems/1.8/gems/searchlogic-2.5.6/lib/searchlogic/named_scopes/or_conditions.rb:28:in `create_condition'
/Library/Ruby/Gems/1.8/gems/searchlogic-2.5.6/lib/searchlogic/named_scopes/column_conditions.rb:63:in `respond_to?'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.8/lib/active_record/base.rb:1511:in `respond_to?'
/Library/Ruby/Gems/1.8/gems/paperclip-2.4.0/lib/paperclip.rb:402:in `attachment_definitions'
/Library/Ruby/Gems/1.8/gems/paperclip-2.4.0/lib/paperclip.rb:283:in `has_attached_file'
/project/app/models/media.rb:23
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:158:in `require'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:158:in `require'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:265:in `require_or_load'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:425:in `load_missing_constant'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:80:in `const_missing'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:92:in `const_missing'
project/test/factories/general.rb:87 #This is where Media is referenced... but it should have errored about any of the other 10 Models that don't have tables above where this one is used in this file....
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:147:in `load_without_new_constant_marking'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:147:in `load'
/Library/Ruby/Gems/1.8/gems/factory_girl-2.0.5/lib/factory_girl/find_definitions.rb:20:in `find_definitions'
/Library/Ruby/Gems/1.8/gems/factory_girl-2.0.5/lib/factory_girl/find_definitions.rb:19:in `each'
/Library/Ruby/Gems/1.8/gems/factory_girl-2.0.5/lib/factory_girl/find_definitions.rb:19:in `find_definitions'
/Library/Ruby/Gems/1.8/gems/factory_girl-2.0.5/lib/factory_girl/find_definitions.rb:15:in `each'
/Library/Ruby/Gems/1.8/gems/factory_girl-2.0.5/lib/factory_girl/find_definitions.rb:15:in `find_definitions'
/Library/Ruby/Gems/1.8/gems/factory_girl-2.0.5/lib/factory_girl/rails2.rb:6
/Library/Ruby/Gems/1.8/gems/rails-2.3.8/lib/initializer.rb:614:in `call'
/Library/Ruby/Gems/1.8/gems/rails-2.3.8/lib/initializer.rb:614:in `after_initialize'
/Library/Ruby/Gems/1.8/gems/rails-2.3.8/lib/initializer.rb:613:in `each'
/Library/Ruby/Gems/1.8/gems/rails-2.3.8/lib/initializer.rb:613:in `after_initialize'
/Library/Ruby/Gems/1.8/gems/rails-2.3.8/lib/initializer.rb:179:in `process'
/Library/Ruby/Gems/1.8/gems/rails-2.3.8/lib/initializer.rb:113:in `send'
/Library/Ruby/Gems/1.8/gems/rails-2.3.8/lib/initializer.rb:113:in `run'
/project/config/environment.rb:17 #why does it jump into the env? this is irrelevant to raking.
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in `require'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in `require'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:521:in `new_constants_in'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in `require'
/Library/Ruby/Gems/1.8/gems/rails-2.3.8/lib/tasks/misc.rake:4
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:607:in `invoke_prerequisites'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `each'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `invoke_prerequisites'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:in `invoke_with_call_chain'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/bin/rake:31
/usr/bin//rake:19:in `load'
/usr/bin//rake:19
EDIT: 最初の移行ファイル: http://pastebin.com/49aJe2wv それもまだ存在していない上erroringだテーブル。
テストDBにテーブルがありません。
EDIT2:スタックトレースの詳細一般 工場/:87
Factory.define :media, :class => Media do |m| #line 87 <----
m.name "Alice is in an asian wonderland"
m.document_file_name "alice_test_image.jpeg"
m.document_content_type "image/jpeg"
m.document_file_size "155548"
...
end
EDIT3: Media.rb http://pastebin.com/rZpdBTyq
私たちを考えます実行しようとしている移行ファイルの内容を確認する必要があります。もしそうなら、 – asc99c
。間違っている表は最初の移行でさえないので、助けてくれるとは思わない。 – DerNalia
また、スタックトレースは移行のいずれかに到達していることを示していません.... – DerNalia