如何在Heroku中部署基於Sinatra的Ruby Web應用程序?如何將基於Sinatra的Ruby Web應用程序部署到Heroku?
我有一個基於Sinatra的web application。當我想在本地運行它時,我做了以下操作:
- 在命令行中,我轉到目錄servers/dev。
- 運行
thin start -R songcontest.ru
現在我想部署相同的應用程序的Heroku。我遵循教程的前幾個步驟(step 1,step 2,step 3)。
現在我想運行git push heroku master
,這是將應用程序部署到Heroku的下一步。當我這樣做,我得到了以下錯誤消息:
remote: ! Push rejected, no Cedar-supported app detected
remote: HINT: This occurs when Heroku cannot detect the buildpack
remote: to use for this application automatically.
remote: See https://devcenter.heroku.com/articles/buildpacks
我怎樣才能解決這個問題(請在Heroku我的應用程序運行)?
你看過錯誤信息中的推薦文章嗎? – thesecretmaster
@祕書長是的。我設置了構建包,並將Gemfile放入根目錄。這(Gemfile的存在)是Ruby構建包的檢測腳本檢查的內容。但我仍然收到錯誤消息(生成包未檢測到)。我問Heroku對此的支持。當前版本可從https://github.com/dpisarenko/50web/tree/heroku獲得。我嘗試在本地運行應用程序('bundle install',然後'bundle exec rackup -p 9292 songcontest.ru')並且它工作了(一個頁面在'localhost:9292'處可用)。 –
@thesecretmaster有關我迄今嘗試的更多詳細信息,請訪問http://altruix.cc/song-contest/deployment-on-heroku/。 –