首页 > 解决方案 > 如何在 AWS 弹性 beanstalk 应用程序上使用 puma 配置 Rails?

问题描述

我有一个使用 Ruby 和 Puma 的 EBS 应用程序,在我的 rails 应用程序中,我puma.rb/config/puma.rb

workers 2

threads 1, 6

app_dir = File.expand_path("../..", __FILE__)

# Default to production
rails_env = ENV['RAILS_ENV'] || "production"
environment rails_env

activate_control_app

# Allow puma to be restarted by `rails restart` command.
plugin :tmp_restart

我在 Gemfile 中列出并安装了 puma gem

当我部署到弹性 beanstalk 应用程序时,我得到了成功的部署,并且应用程序状态为绿色,但是,当我访问应用程序链接时,我得到了错误This site can’t be reached

我试图通过 ssh 进入 ec2 实例,puma命令将得到:

$ puma
Puma starting in single mode...
* Version 2.16.0 (ruby 2.5.1-p57), codename: Midwinter Nights Trance
* Min threads: 0, max threads: 16
* Environment: production
ERROR: No application configured, nothing to run

那么,我想念什么?

标签: ruby-on-railsrubyamazon-web-servicespuma

解决方案


推荐阅读