【发布时间】:2014-02-20 07:23:35
【问题描述】:
我正在将 Rails 应用程序部署到服务器。如果我只需要production,我可以轻松完成所有事情。但我也需要staging。
我使用以下命令启动我的独角兽服务器:
bundle exec /home/deployer/apps/myapp/shared/bundle/ruby/2.0.0/bin/unicorn_rails \
-D -c /home/deployer/apps/myapp/shared/config/unicorn.config.rb -E staging
但是不管我的命令是什么,服务器都会使用production 环境启动应用程序。
我的应用程序中是否还有其他地方应该将环境指定为staging?
谢谢!
【问题讨论】:
-
您确定在应用配置中添加了暂存环境吗?参考stackoverflow.com/questions/19344267/…
标签: ruby-on-rails unicorn production-environment staging