2010-11-06 14 views
2

Je n'ai jamais vu cette erreur auparavant, et je n'ai aucune idée de ce que je devrais rechercher.rake db: migrate -> niveau de la pile trop profond

$ rake db:migrate --trace 
(in /Users/tscolari/Projetos/movies) 
** Invoke db:migrate (first_time) 
** Invoke environment (first_time) 
** Execute environment 
** Execute db:migrate 
rake aborted! 
stack level too deep 
/opt/local/lib/ruby/gems/1.8/gems/scrubyt-0.4.06/lib/scrubyt/utils/ruby_extensions.rb:66:in `write' 
/opt/local/lib/ruby/gems/1.8/gems/scrubyt-0.4.06/lib/scrubyt/utils/ruby_extensions.rb:66:in `collect' 
/opt/local/lib/ruby/gems/1.8/gems/scrubyt-0.4.06/lib/scrubyt/utils/ruby_extensions.rb:66:in `write' 
/opt/local/lib/ruby/gems/1.8/gems/scrubyt-0.4.06/lib/scrubyt/utils/ruby_extensions.rb:66:in `write' 
/opt/local/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/buffered_logger.rb:108:in `flush' 
/opt/local/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/buffered_logger.rb:101:in `synchronize' 
/opt/local/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/buffered_logger.rb:101:in `flush' 
/opt/local/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/buffered_logger.rb:125:in `auto_flush' 
/opt/local/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/buffered_logger.rb:66:in `add' 
/opt/local/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/buffered_logger.rb:77:in `debug' 
/opt/local/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/connection_adapters/abstract_adapter.rb:201:in `log' 
/opt/local/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/connection_adapters/sqlite_adapter.rb:135:in `execute' 
/opt/local/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/connection_adapters/sqlite_adapter.rb:180:in `tables' 
/opt/local/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/connection_adapters/abstract/schema_statements.rb:21:in `table_exists?' 
/opt/local/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/connection_adapters/abstract/schema_statements.rb:429:in `initialize_schema_migrations_table' 
/opt/local/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/migration.rb:487:in `initialize' 
/opt/local/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/migration.rb:433:in `new' 
/opt/local/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/migration.rb:433:in `up' 
/opt/local/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/migration.rb:415:in `migrate' 
/opt/local/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active_record/railties/databases.rake:142 
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call' 
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute' 
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each' 
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute' 
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain' 
/opt/local/lib/ruby/1.8/monitor.rb:242:in `synchronize' 
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain' 
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke' 
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task' 
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level' 
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each' 
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level' 
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' 
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level' 
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run' 
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' 
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run' 
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31 
/opt/local/bin/rake:19:in `load' 
/opt/local/bin/rake:19 

D'abord je pensais que ce pourrait être quelque chose de mal dans l'un de mes migrations, alors je les ai enlevé tout vérifier, et l'erreur encore. Et étrangement l'application/console démarre sans aucun problème:

$ rails server 
=> Booting Mongrel 
=> Rails 3.0.0 application starting in development on http://0.0.0.0:3000 
=> Call with -d to detach 
=> Ctrl-C to shutdown server 

Et puis je ne sais pas où chercher l'erreur. De l'aide?

+0

Cette erreur se produit hors de l'environnement de développement? En outre, je remarque que la trace échoue dans 'scrubyt' - pouvez-vous désactiver cette gemme et réessayer la migration? – zetetic

Répondre

1

D'accord, je tout essayé, rake db:reset, la suppression de toutes les migrations, et ainsi de suite ...

Le problème est un vrai bijou. scrubyt gem dans mon gemfile causé tout ce problème ...

+0

D'une manière ou d'une autre, mon problème est similaire au vôtre, pouvez-vous s'il vous plaît vérifier ma question ici: http://stackoverflow.com/questions/13431245/why-rake-dbstatus-causes-stack-level-too-deep – simo

-1

Parfois, les db's sortent de l'ordinaire. Ce que vous pouvez faire est de sauvegarder votre schéma actuel, puis de réinitialiser votre db rake db:reset et d'effectuer une nouvelle migration script/generate migration add_old_db migrant l'ensemble de votre ancien schéma en tant que nouvelle migration. Il suffit de copier et coller votre ancien schéma dans la nouvelle migration et il fera de nouvelles tables comme il aurait pu l'être auparavant. Bien sûr, vos données seront détruites dans le processus.