Mysql2 通过 nginx 和 unicorn 访问 Rails 应用程序时出错

标签 mysql nginx ruby-on-rails-4 unicorn

我已经设置了生产服务器,并且在 nginx 上使用 capistrano 3.1 并在 Ubuntu Server 12.04LTS 上使用 unicorn 部署了 Rails 应用程序。通过普通 Rails 服务器访问时,该应用程序工作正常,但每当我尝试通过 unicorn 运行服务器时,它都会说它无法访问数据库中的某些表。附件是错误的快照和数据库查询的快照。 enter image description here

enter image description here

最佳答案

正如上面评论中所述,我清除了数据库、文件夹,并在删除 capistrano 的迁移扩展后重新运行部署,一切正常。

关于Mysql2 通过 nginx 和 unicorn 访问 Rails 应用程序时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21958491/

相关文章:

ruby-on-rails-4 - mongoid-历史 : undefined local variable or method `metadata' for

mysql - mongify 检查database.config 的问题

php - 将 mySQL 数据库的行链接到引用的页面

python - Nginx,ec2 上的 django,弹性 ip 没有响应

node.js - nginx 临时文件夹的权限设置问题

ruby-on-rails - 如何在 Rails 中使用多态关联管理多个角色?

ruby-on-rails - Rails : Strong parameters, 它必须一直存在吗?

mysql - 如何使用 MySQL 记录 Windows 7 网络流量和磁盘使用情况?

php - 使用 PHP 在 wwwroot 中自动下载一个文件(.sql)

ubuntu - nginx.conf 中的过期会在 ubuntu 上引发错误,但在 OSX 上不会