我刚刚成功地将我的RoR应用程序部署到使用橡胶& Capistrano的AWS。但是,当我导航到页面时,它显示默认的nginx页面。显然,我在设置阶段错过了一些东西,将nginx/unicorn指向正确的目录来为我的应用程序提供服务。Capistrano部署独角兽错误未初始化常量RAILS_ENV(NameError)
当我运行tail -f log/unicorn.stderr.log
我看到以下内容:
E, [2015-12-07T14:23:41.253757 #3808] ERROR -- : reaped #<Process::Status: pid 24405 exit 1> worker=0
E, [2015-12-07T14:23:41.301617 #24409] ERROR -- : uninitialized constant RAILS_ENV (NameError)
/ebs/microposts2-production/current/config/unicorn.rb:73:in `rescue in block in reload'
/ebs/microposts2-production/current/config/unicorn.rb:61:in `block in reload'
/ebs/microposts2-production/shared/bundle/ruby/2.0.0/gems/unicorn-5.0.1/lib/unicorn/http_server.rb:611:in `call'
/ebs/microposts2-production/shared/bundle/ruby/2.0.0/gems/unicorn-5.0.1/lib/unicorn/http_server.rb:611:in `init_worker_process'
/ebs/microposts2-production/shared/bundle/ruby/2.0.0/gems/unicorn-5.0.1/lib/unicorn/http_server.rb:639:in `worker_loop'
/ebs/microposts2-production/shared/bundle/ruby/2.0.0/gems/unicorn-5.0.1/lib/unicorn/http_server.rb:508:in `spawn_missing_workers'
/ebs/microposts2-production/shared/bundle/ruby/2.0.0/gems/unicorn-5.0.1/lib/unicorn/http_server.rb:519:in `maintain_worker_count'
/ebs/microposts2-production/shared/bundle/ruby/2.0.0/gems/unicorn-5.0.1/lib/unicorn/http_server.rb:283:in `join'
/ebs/microposts2-production/shared/bundle/ruby/2.0.0/gems/unicorn-5.0.1/bin/unicorn_rails:209:in `<top (required)>'
/ebs/microposts2-production/shared/bundle/ruby/2.0.0/bin/unicorn_rails:23:in `load'
/ebs/microposts2-production/shared/bundle/ruby/2.0.0/bin/unicorn_rails:23:in `<main>'
我假设,因为环境被追加到我的应用程序名称Rubber.env
存在,但是这个错误让我认为并非如此。哎呀,我甚至不确定这个问题甚至适用于nginx默认页面问题。有人可以分享我做错了什么,或错过了吗?
有趣......我在别处回答了我自己的问题...... lmfao – Godzilla74