【发布时间】:2014-04-14 18:25:35
【问题描述】:
我正在尝试这样部署:
bundle exec cap deploy:cold
RAILS_ENV=production rake db:migrate
bundle exec cap deploy:migrate
但一直在日志文件中显示错误:
I, [2014-04-14T14:15:14.853543 #10769] INFO -- : Started GET "/users/sign_up" for
176.192.228.14 at 2014-04-14 14:15:14 -0400
I, [2014-04-14T14:15:14.856055 #10769] INFO -- : Processing by
Devise::RegistrationsController#new as HTML
I, [2014-04-14T14:15:14.857398 #10769] INFO -- : Completed 500 Internal Server Error
in 1ms
F, [2014-04-14T14:15:14.860844 #10769] FATAL -- :
ActiveRecord::StatementInvalid (Could not find table 'users')
但在 current/db 文件夹中创建了 production.sqlite3 。
在 localhost:3000 中它工作正常。
如何使用 capistrano 迁移数据库以进行生产?
我使用 nginx 和 unicorn,这是我的 repo https://github.com/EgorkZe/bh
【问题讨论】:
标签: ruby-on-rails nginx sqlite capistrano production