服务器 ubuntu 64b 使用 rails 3.1 的应用程序 数据库mysql
现在 rails db:create 工作正常
Rails db:migrate 手动完成或通过 cap deploy:migration 给我以下错误:
rake aborted! Mysql2::Error: Table 'mywebsite_production.galleries' doesn't exist: SHOW FIELDS FROM
galleries
/srv/d_mywebsite/www/mywebsite/shared/bundle/ruby/1.9.1/gems/activerecord-3.1.3/lib/active_record/connection_adapters/mysql2_adapter.rb:283:in `query'
这个部署有什么问题?
最佳答案
我只是在我的 config/routes.rb
上注释掉设备和 rails_admin
路由,然后一切正常。检查您的任何路线是否需要存在 mywebsite_production.galleries
。
关于ruby-on-rails - Rails 应用程序部署,rake DB :migrate doesn't create table and want table to already be here to create them,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11135931/