Sinatra 应用程序不会发布到 Heroku
我有一个非常简单的 Sinatra 应用程序,我正在尝试将其发布到 Heroku。我已经创建了帐户,并且应用程序在本地运行良好,但是当我输入:
git push heroku master (from within the applications root folder)
我得到:
-----> Heroku receiving push
-----> Removing .DS_Store files
! Heroku push rejected, no Rails or Rack app detected
To [email protected]:pure-mist-880.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to '[email protected]:pure-mist-880.git'
我的 config.ru 文件非常简单(也可能是问题,因为我已经看到了几种不同的方法来编写一个...):
require './raffle'
map '/' do
run Raffler
end
但在本地一切都运行良好。
我缺少什么?
I have a very simple Sinatra app that I'm trying to publish to Heroku. I've got the accounts created, and the app runs fine locally, but when I type:
git push heroku master (from within the applications root folder)
I get:
-----> Heroku receiving push
-----> Removing .DS_Store files
! Heroku push rejected, no Rails or Rack app detected
To [email protected]:pure-mist-880.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to '[email protected]:pure-mist-880.git'
My config.ru file is super simple (and possibly the problem, as I've seen a couple of different ways to write one...):
require './raffle'
map '/' do
run Raffler
end
But it all runs fine locally.
What am I missing?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
简单就是好的。我使用这个
config.ru
文件在 Heroku 上运行了一个 Sinatra 应用程序:app.rb
包含类似这样的内容(它是一个模块化风格的应用程序):Simple is good. I got a Sinatra application working on Heroku with this
config.ru
file:The
app.rb
contains something like this (its a modular style app):