【发布时间】:2020-03-16 21:06:02
【问题描述】:
我使用的是 Heroku 开发中心提供的最简单的结构和代码:
一个“hello.rb”文件
require 'sinatra'
get '/' do
"Hello World"
end
一个“config.ru”文件
require './hello'
run Sinatra::Application
一个“gemfile”文件
source 'https://rubygems.org'
gem 'sinatra'
我在终端上:
$git init
$heroku create
$bundle
$git add .
$git commit -m "bundle"
$git push heroku master
该应用程序与 heroku local 一起工作,但是当尝试推送任何 Sinatra 应用程序时,总是会收到相同的错误消息:
> Enumerating objects: 29, done. Counting objects: 100% (29/29), done.
> Delta compression using up to 12 threads Compressing objects: 100% (25/25), done.
> Writing objects: 100% (29/29), 5.63 KiB | 1.88 MiB/s, done.
> Total 29 (delta 3), reused 0 (delta 0) remote: Compressing source files... done.
> remote: Building source:
> remote:
> remote: ! No default language could be detected for this app.
> remote: HINT:This occurs when Heroku cannot detect the buildpack to use for this application automatically.
> remote: See https://devcenter.heroku.com/articles/buildpacks
> remote:
> remote: ! Push failed remote: Verifying deploy...
> remote:
> remote: ! Push rejected to sinatrina. remote:
添加 procfile 或 bundlepack 总是返回与上面相同的消息。我错过了一步吗?
【问题讨论】:
-
medium.com/@christine_tran/… 我认为这可能会有所帮助
标签: ruby git heroku deployment sinatra