簡體   English   中英

如何將我的Rails應用推送到Heroku

[英]How to push my Rails app to Heroku

我對需要遷移的數據庫進行了更改。

毫無疑問地將更改提交到github后,當我嘗試使用將應用程序推送到Heroku時

push heroku master

我在命令行上收到一些錯誤消息。

Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote:        Warning: the running version of Bundler (1.13.7) is older than the version that created the lockfile (1.14.6). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.

如錯誤提示所指示,我跑了

gem install bundler

然后它給了我第二個錯誤:

WARNING:
remote: No Procfile detected, using the default web server.
remote: We recommend explicitly declaring how to boot your server process via a Procfile
devcenter.heroku.com/articles/ruby-default-web-server

我按照所附鏈接中網站上的說明進行操作,但未解決問題。

誰能告訴我我是否在更大的范圍內缺少某些東西?

背景/更多信息:過去我沒有問題地將數據庫遷移到Heroku,為產品添加了一種方法,然后出現了很多錯誤。

在此處輸入圖片說明

Heroku限制了您的應用可以在生產環境中使用的Bundler版本。 即使您的版本較新-也會生成上述消息。

參見https://devcenter.heroku.com/articles/bundler-version

至於Procfile消息-生成該消息是因為您試圖安裝要求該文件在Heroku而不是Webrick上運行的服務器gem(最有可能是Puma)。 Webrick通常被認為不適合生產使用,因為它不能一次接受大量傳入請求。

如果您嘗試運行Puma, 按照https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server上的說明進行操作。

對於捆綁器錯誤,您應該可以安全地忽略它(因為您收到警告而不是真正的錯誤)。 參見Heroku文章

關於procfile錯誤,請訪問引用的文章或閱讀有關Process Types和Procfile的文章 同樣,您可以放心地忽略此警告,Heroku將使用默認的Web服務器(我相信Webrick)啟動。

暫無
暫無

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

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