rake db:migrate不起作用

时间:2012-04-24 06:27:12

标签: ruby-on-rails ruby-on-rails-3

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抛出了这个错误。

1 个答案:

答案 0 :(得分:4)

可能你没有数据库或你的架构没有更新,尝试运行rake db:reset(这将删除你的数据库,创建数据库,加载架构和种子数据,不要这样做如果您的数据库中有重要数据。)

有关详细信息,请参阅bundle exec rake -T db