【问题标题】:Puma Web Server No Procfile detected, using the default web server (webrick)Puma Web 服务器未检测到 Procfile,使用默认 Web 服务器 (webrick)
【发布时间】:2015-12-18 03:22:54
【问题描述】:

尝试将 Puma Web Server 与 heroku 一起用于应用程序。我创建了一个名为“Procfile”的 Procfile,其中包含以下内容。

web: bundle exec puma -C config/puma.rb

我还有一个 config/puma.rb 文件,其中包含以下内容。

workers Integer(ENV['WEB_CONCURRENCY'] || 2)
threads_count = Integer(ENV['MAX_THREADS'] || 5)
threads threads_count, threads_count

preload_app!

rackup      DefaultRackup
port        ENV['PORT']     || 3000
environment ENV['RACK_ENV'] || 'development'

on_worker_boot do 
   ActiveRecord::Base.establish_connection
end

我在终端收到以下警告

$git push heroku master

###### WARNING:
remote:        No Procfile detected, using the default web server (webrick)

【问题讨论】:

  • 发布错误以便我们更好地评估问题
  • 欢迎来到 Stack Overflow。我们需要您提供更多信息。确切的错误是什么?请阅读“How to Ask”。
  • 您的 Procfile 是否在应用的根文件夹中,您在推送之前提交了吗?
  • 是的!当我 "$git commit -m "Procfile": "$nothing to commit, working directory clean"
  • 您使用的大小写是否正确? Procfile - 如果您执行heroku run bash 并执行ls,您会在文件列表中看到它吗?

标签: ruby heroku puma procfile


【解决方案1】:
$git run bash

Bash 确认它正在运行

$ls 

显示所有文件。 Procfile 被识别为扩展名为 Procfile.rtf

删除了以前的 Procfile。创建另一个 Procfile 并确保没有扩展。然后运行以下内容:

$Git add .
$Git commit -m "Procfile" 
$Git push heroku master

【讨论】:

    猜你喜欢
    • 2015-07-17
    • 1970-01-01
    • 1970-01-01
    • 2020-02-21
    • 2021-04-17
    • 1970-01-01
    • 1970-01-01
    • 2018-05-19
    • 2016-07-19
    相关资源
    最近更新 更多