gpt4 book ai didi

将 RoR 部署到 AWS Beanstalk 时出现 Nginx 错误

转载 作者:行者123 更新时间:2023-12-03 19:42:23 27 4
gpt4 key购买 nike

我正在尝试将 Ruby on Rails API 部署到 AWS Elastic Beanstalk,但没有任何运气。我曾经可以成功部署,但我只会遇到错误,因为生产环境没有 db:seed。但是突然每次我想部署时我都会在日志上出现以下错误

-------------------------------------
/var/app/support/logs/passenger.log
-------------------------------------
[ 2016-12-16 13:22:39.2849 5408/7f442ea10780 agents/Watchdog/Main.cpp:728 ]: All Phusion Passenger agents started!
2016/12/16 13:22:40 [error] 5427#0: *3 "/var/app/current/public/index.html" is not found (2: No such file or directory), client: 127.0.0.1, server: _, request: "HEAD / HTTP/1.1", host: "0.0.0.0"
2016/12/16 13:22:40 [error] 5427#0: *3 testing "/var/app/current/public" existence failed (2: No such file or directory) while logging request, client: 127.0.0.1, server: _, request: "HEAD / HTTP/1.1", host: "0.0.0.0"


-------------------------------------
/var/log/eb-activity.log
-------------------------------------
+ service passenger restart
--> Downloading a Phusion Passenger agent binary for your platform
---------------------------------------
No precompiled Nginx engine could be downloaded. Compiling it from source instead.
--------------------------------------------

Your system does not have a lot of virtual memory

Installing...
Downloading Nginx 1.8.1 source code...
Extracting tarball...
Compiling support libraries (step 1 of 2)...
Compiling Nginx engine (step 2 of 2)...

./configure: error: invalid option "--with-http_v2_module"
*** ERROR: command failed: cd /tmp/passenger-install.158a2iu/nginx-1.8.1 && env PASSENGER_INCLUDEDIR=/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/passenger-5.1.0/src PASSENGER_LIBS=/tmp/passenger-install.158a2iu/common/libpassenger_common/Logging.o\ /tmp/passenger-install.158a2iu/common/libpassenger_common/Exceptions.o\ /tmp/passenger-install.158a2iu/common/libpassenger_common/Utils/SystemTime.o\ /tmp/passenger-install.158a2iu/common/libpassenger_common/Utils/StrIntUtils.o\ /tmp/passenger-install.158a2iu/common/libpassenger_common/Utils/StrIntUtilsNoStrictAliasing.o\ /tmp/passenger-install.158a2iu/common/libpassenger_common/Utils/IOUtils.o\ /tmp/passenger-install.158a2iu/common/libpassenger_common/Utils.o\ /tmp/passenger-install.158a2iu/common/libpassenger_common/WatchdogLauncher.o\ /tmp/passenger-install.158a2iu/common/libpassenger_common/AppTypes.o\ /tmp/passenger-install.158a2iu/common/libpassenger_common/Utils/CachedFileStat.o\ /tmp/passenger-install.158a2iu/common/libpassenger_common/UnionStationFilterSupport.o\ /tmp/passenger-install.158a2iu/common/libboost_oxt.a /bin/bash ./configure --prefix=/tmp --with-cc-opt=-Wno-error --without-http_fastcgi_module --without-http_scgi_module --without-http_uwsgi_module --with-ipv6 --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-http_gzip_static_module --with-http_stub_status_module --with-http_addition_module --add-module=/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/passenger-5.1.0/src/nginx_module

我什至 git revert commits 以返回到成功部署但遇到相同错误的版本!

PD:
我必须做的另一件事(在第一次工作之前)是将 EC2 实例的根卷大小设置为 16 GiB,因为我会收到 budler 无法安装 nokogiri gem 的错误,它实际上解决了这个问题

最佳答案

您看到的错误几乎可能是因为您有 Passenger Gemfile 中列出的 Gem。取出或放入 development如果需要,部分应该可以解决问题。Passenger预安装在 AWS ElasticBeanstalk Ruby Stack 上。

关于将 RoR 部署到 AWS Beanstalk 时出现 Nginx 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41185937/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com