Rails 在 Heroku 上部署应用

Rails app deploy on Heroku

我是 rails 应用程序开发的新手 我对 rails 部署有点困惑。

我按照下面的指南完成了所有操作。 这意味着我的 rails 应用处于生产模式?

需要在推送到 heroku 之前将配置文件中的 Puma RACK_ENV 更改为 'production'?

https://devcenter.heroku.com/articles/getting-started-with-rails4

我相信是的。整个教程正在设置您的 rails 服务器以在 production 模式下工作。使用一些归纳逻辑,本教程似乎假设您正在生产中:

"Rails 4 no longer has a static index page in production. When you’re using a new app, there will not be a root page in production, so we need to create one. We will first create a controller called welcome for our home page to live:"

向我表明它假定您的 rails 服务器将 运行 投入生产。

为了加倍确定,您可以检查 heroku logs 并查找一行内容:

Rails [your version] application starting in production