我正在尝试从heroku docs部署基本的 sinatra 应用程序。该应用程序似乎正在正确部署和启动,但我看不到它。我错过了什么?
# Gemfile
source 'http://rubygems.org'
gem 'sinatra'
# config.ru
require './hello'
run Sinatra::Application
# hello.rb
require 'sinatra'
get '/' do
"Hello World!"
end
然后我运行:
$ bundle install
$ git init
$ git add --all
$ git commit -m "initial commit"
$ heroku create
$ git push heroku master
$ heroku open
问题是,我得到的只是“Heroku | 没有这样的应用程序”错误。然后我尝试:
$ heroku restart
$ heroku logs
结果如下:
2012-11-02T06:19:24+00:00 heroku[web.1]: Unidling
2012-11-02T06:19:24+00:00 heroku[web.1]: State changed from down to starting
2012-11-02T06:19:27+00:00 heroku[web.1]: Starting process with command `bundle exec rackup config.ru -p 38715`
2012-11-02T06:19:31+00:00 app[web.1]: [2012-11-02 06:19:31] INFO WEBrick 1.3.1
2012-11-02T06:19:31+00:00 app[web.1]: [2012-11-02 06:19:31] INFO ruby 1.9.2 (2011-07-09 [x86_64-linux]
2012-11-02T06:19:31+00:00 app[web.1]: [2012-11-02 06:19:31] INFO WEBrick::HTTPServer#start: pid=2 port=38715
2012-11-02T06:19:32+00:00 heroku[web.1]: State changed from starting to up