簡體   English   中英

未檢測到 Procfile,使用默認 Web 服務器 (webrick)

[英]No Procfile detected, using the default web server (webrick)

嘗試部署我的 Ruby on Rails 應用程序時出現此錯誤。 這是我的命令行中的錯誤:

 ###### WARNING:
remote:        No Procfile detected, using the default web server (webrick)
remote:        https://devcenter.heroku.com/articles/ruby-default-web-server

remote:
remote: -----> Discovering process types
remote:        Procfile declares types -> (none)
remote:        Default types for Ruby  -> console, rake, web, worker
remote:
remote: -----> Compressing... done, 29.5MB
remote: -----> Launching... done, v21
remote:        https://agile-sea-1900.herokuapp.com/ deployed to Heroku
remote:
remote: Verifying deploy... done.
To https://git.heroku.com/agile-sea-1900.git
   e5d3ad8..975d5eb  master -> master

我嘗試遵循“未檢測到 Procfile,使用默認 Web 服務器”[ archive.org ] 中的建議 - 捆綁thin gem 並創建一個包含以下內容的 Procfile:

web: bundle exec thin start -p $PORT

但這沒有幫助。

在評論中給出的信息之上,您有此錯誤,因為在您的Procfile ,您有:

web: bundle exec rails server -p $PORT

因此將使用默認的webrick

為了消除此警告,您應該使用其他 Web 服務器,例如 Unicorn、Thin 或 Puma。

Heroku 現在提倡使用 Puma(參見更新日志)。

要開始使用 Puma 和 Heroku,您可以在 Heroku 網站上閱讀使用 Puma Web 服務器部署 Rails 應用程序一文

就我而言,由於其他在線指南頁面,我忽略了 .gitignore 中的 Procfile。 當時,他們給出了隱藏文件的指令,這些文件聲明了包含郵件程序帳戶信息的環境變量。 因此,請檢查您的 .gitignore 文件,如果您在其中看到 Procfile,則將其刪除。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM