尝试将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)
答案 0 :(得分:0)
$git run bash
Bash确认它正在运行
$ls
显示了所有文件。 Procfile
的扩展名为Procfile.rtf
。
删除了之前的Procfile。创建了另一个Procfile并确保没有扩展名。然后运行以下内容:
$Git add .
$Git commit -m "Procfile"
$Git push heroku master