ruby-on-rails - 如何在 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
那么,我想念什么?
解决方案
推荐阅读
- state - Ansible mount with state:mounted not working for sshfs
- regex - 正则表达式 - 查找所有空格并忽略多行字符串中的连字符分隔的单词
- java - 如何使 hibernate cfgxml 文件能够定位?
- thymeleaf - 创建一个百里香片段列表并将其作为参数传递给另一个片段
- python - 使用 Scrapy 从论坛获取搜索结果
- c++ - 耦合策略模式中的两个行为之间需要和共享大量计算。应该在哪里做和举行
- javascript - 尽管提供了唯一键,但 React 为单选按钮(在地图中)提供了唯一键警告
- oauth-2.0 - 安全原生应用 OAuth2 代码流 + PKCE
- delphi - 避免在文本编辑器中出现不可见的不可打印字符
- sql-server - 如何从sql中的XML字段数据中查询特定标签?