Puma Web 服务器未检测到 Procfile,使用默认的 Web 服务器 (webrick)
Puma Web Server No Procfile detected, using the default web server (webrick)
正在尝试将 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)
$git run bash
Bash 确认是 运行
$ls
显示所有文件。 Procfile
被识别为扩展名为 Procfile.rtf
。
删除了之前的 Procfile。创建了另一个 Procfile 并确保没有扩展名。然后 运行 以下内容:
$Git add .
$Git commit -m "Procfile"
$Git push heroku master
正在尝试将 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)
$git run bash
Bash 确认是 运行
$ls
显示所有文件。 Procfile
被识别为扩展名为 Procfile.rtf
。
删除了之前的 Procfile。创建了另一个 Procfile 并确保没有扩展名。然后 运行 以下内容:
$Git add .
$Git commit -m "Procfile"
$Git push heroku master