我正在尝试为一个Ruby on Rails网络应用程序设置本地的生产环境。我可以使用rails server
命令运行该应用程序,以获得开发环境。
我要设置的生产环境是纯粹的本地环境,并且我已经按照以下教程使用apache 2进行设置:https://www.digitalocean.com/community/tutorials/how-to-setup-a-rails-4-app-with-apache-and-passenger-on-centos-6
然而,当我访问我的应用程序页面时,出现以下错误:
PG::InsufficientPrivilege: ERROR: permission denied for relation schema_migrations : SELECT "schema_migrations".* FROM "schema_migrations"
在我的database.yml文件中,我为开发和生产设置了以下配置:
adapter: postgresql
database: whiteboard
username:
password:
pool: 5
timeout: 5000
无论如何,我都不能更改这些设置。
有没有办法解决这个问题?(如果有,请逐步说明)
GRANT ALL PRIVILEGES ON DATABASE whiteboard TO nobody
,现在应用程序可以运行了!显然我为Apache创建了一个名为nobody的用户。我也会查看您发布的链接,这可能是更好的解决方案。 - Victoria S.