ruby-on-rails - Why is passenger with Nginx looking for passenger_wsgi.py in my rails app
问题描述
My conf file looks like
root /var/www/root/public;
# Turn on Passenger
passenger_enabled on;
passenger_ruby /usr/local/rvm/gems/ruby-2.5.1/wrappers/ruby;
and whenever I curl to the site the error I see in Nginx logs is
Cannot stat '/var/www/root/passenger_wsgi.py': Permission denied (errno=13); This error means that the Nginx worker process (PID 4417, running as UID 33) does not have permission to access this file.
But this is a rails app and I do not have python.
The passenger gem is installed and the app is deployed in production mode.
Why is it looking for a python file and how do I fix this error?
This is on Linode if it helps and I am using rvm.
解决方案
根据帖子中提到的描述,您似乎没有为 ruby 应用程序正确安装乘客。
在安装乘客期间,您可以选择要针对哪种语言安装(节点、python、ruby 等)。
现在根据共享的日志,它似乎正在充当 python 应用程序的应用服务器。
我遇到了同样的问题,我发现完成这项工作的唯一方法是卸载乘客并再次安装(选择 ruby 作为 )。
推荐阅读
- excel - 运行时错误 1004 排序引用无效?
- c++ - 为什么即使我使用 break 语句,我也会得到 3 7 作为输出 /* 4 4 2 2 4 3 */ /* o/p 1 2 3 7 */
- php - QuickBooks webhook 在本地与 ngrok 一起工作,但不适用于生产
- html - 无法移动带有边距或 leftxx 的框
- twitter-bootstrap - 引导升级到最新版本
- r - 为 R plotly scatterplot 进行正确的可视化
- reactjs - 使用打字稿将自定义道具传递给反应组件
- postgresql - 是否可以停止 AWS Postgres Aurora 全球数据库?
- php - 每次在管理页面编辑帖子时,如何防止上传图片?
- java - 有没有办法将 VisualVM 附加到由 AWS SAM local 运行的 java lambda 函数