2015-12-07 79 views
0

我刚刚成功地将我的RoR应用程序部署到使用橡胶& Capistrano的AWS。但是,当我导航到页面时,它显示默认的nginx页面。显然,我在设置阶段错过了一些东西,将nginx/unicorn指向正确的目录来为我的应用程序提供服务。Capistrano部署独角兽错误未初始化常量RAILS_ENV(NameError)

default nginx

当我运行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默认页面问题。有人可以分享我做错了什么,或错过了吗?

回答

0

你需要清除默认的nginx虚拟主机通常在/etc/nginx/sites-enabled/default,只需删除该文件,然后你应该很好去。

+0

该目录不存在。我认为这是因为我部署橡胶/ Capistrano。因此,我看到一个'conf.d /'和'rubber /'文件夹,其中包含相应的'.conf'文件。 – Godzilla74

+0

你在部署什么操作系统? – CWitty

+0

我正在使用Ubuntu – Godzilla74

相关问题