我剛剛成功地將我的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