![](/img/trans.png)
[英]Rails 3 in production mode (apache and thin) can't find rubygems
[英]Why when I start thin server in production mode it can't find my users table, but it does in regular mode ? - Rails 3
我试图在生产中的应用中复制错误,但是当我像这样启动thin时:
thin -e production start
当我转到主页时,得到以下信息:
ActiveRecord::StatementInvalid in Devise::SessionsController#new
Could not find table 'users'
这很奇怪,因为一旦我这样做:
thin start
该页面现在可以使用了。
进入生产模式后,我是否必须运行一组新的迁移? 还是在生产模式下不喜欢SQLite?
谢谢。
假设config / database.yml正确设置,并且尚未设置生产数据库,则需要:
rake db:setup RAILS_ENV="production"
设置您的生产数据库。 此方法查看架构文件,而不是应用所有迁移,这是首选方法。
我希望这有帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.