2012-04-24 149 views
1
rake db:migrate 
(in /home/pal/project/sprint-19) 
DEPRECATION WARNING: require "activerecord" is deprecated and will be removed in Rails 3. Use require "active_record" instead. (called from /usr/lib/ruby/vendor_ruby/activerecord.rb:2) 
DEPRECATION WARNING: "Rails.root/test/mocks/development" won't be added automatically to load paths anymore in future releases. (called from /home/pal/project/new-sprint/sprint-19/config/application.rb:51) 
DEPRECATION WARNING: Rake tasks in /home/pal/project/new-sprint/sprint-19/vendor/plugins/authorization/tasks/authorization_tasks.rake are deprecated. Use lib/tasks instead. (called from /home/pa/project/new-sprint/sprint-19/Rakefile:7) 
DEPRECATION WARNING: Rake tasks in /home/pal/project/new-sprint/sprint-19/vendor/plugins/chartdirector/tasks/chartdirector_tasks.rake are deprecated. Use lib/tasks instead. (called from /home/pal/project/new-sprint/sprint-19/Rakefile:7) 
DEPRECATION WARNING: Rake tasks in /home/pal/project/new-sprint/sprint-19/vendor/plugins/headliner/tasks/headliner_tasks.rake are deprecated. Use lib/tasks instead. (called from /home/pal/project/new-sprint/sprint-19/Rakefile:7) 
DEPRECATION WARNING: Rake tasks in /home/pal/project/new-sprint/sprint-19/vendor/plugins/open_flash_chart/tasks/open_flash_chart_tasks.rake are deprecated. Use lib/tasks instead. (called from /home/pal/project/new-sprint/sprint-19/Rakefile:7) 
DEPRECATION WARNING: Rake tasks in /home/pal/project/new-sprint/sprint-19/vendor/plugins/rails_indexes/tasks/indexer.rake are deprecated. Use lib/tasks instead. (called from /home/pal/project/new-sprint/sprint-19/Rakefile:7) 
DEPRECATION WARNING: RAILS_ROOT is deprecated. Please use ::Rails.root.to_s. (called from join at /home/pal/project/new-sprint/sprint-19/lib/tasks/helpers.rb:15) 
rake aborted! 
Table 'connect_production_new.settings' doesn't exist 

我嘗試過使用MySQL和Postgres,但它只是爲MySQL引發此錯誤。rake db:遷移不起作用

+1

您的遷移嘗試對尚不存在的表執行某些操作。如果您想要更詳細的答案,請將您的遷移添加到問題中。 – Mischa 2012-04-24 06:30:53

+1

我附近有100個遷移文件,它的第一個遷移意味着我創建了新的數據庫,現在我正在做遷移 – SSP 2012-04-24 06:36:14

+1

嗯,錯誤信息很明顯不是嗎? '表'connect_production_new.settings'不存在'這意味着你的一個遷移嘗試使用一個尚不存在的表。我不認爲任何人都可以幫助你,如果你只發布錯誤,但不是你的代碼。 – Mischa 2012-04-24 06:39:57

回答

4

也許你沒有數據庫或者你的模式沒有更新,試着運行rake db:reset(這會丟棄你的數據庫,創建數據庫,載入模式和種子數據,如果你有數據庫中的重要數據)。

查看bundle exec rake -T db瞭解更多信息。