我需要根据环境设置独角兽的端口。像这样的东西:
#config/unicorn.rb
if Rails.env.production?
listen 8080, :tcp_nopush => true
elsif Rails.env.staging?
listen 3001, :tcp_nopush => true
end
上面的代码返回这个错误:
[out :: 172.30.1.24] config/unicorn.rb:32:in `reload': uninitialized constant Unicorn::Configurator::Rails (NameError)
如何根据环境更改端口?
泰!