Итак, я действительно борюсь с этим. Я собираюсь ударить моего друга, если я не смогу решить это ...
Итак, я пытаюсь развернуть приложение Sinatra в Heroku, но каждый раз, когда я пытаюсь, я получаю одно и то же сообщение об ошибке, старое доброе «Ошибка приложения».
Между прочим, он работает на моем локальном сервере, запустив
$ruby sppin.rb
Вот мой лог и мои файлы config.ru:
(извините за длину. = /)
2011-11-17T18:14:47+00:00 heroku[api]: Deploy 438c175 by arthur@sppin.com.br
2011-11-17T18:14:47+00:00 heroku[api]: Release v13 created by arthur@sppin.com.br
2011-11-17T18:14:47+00:00 heroku[web.1]: State changed from created to starting
2011-11-17T18:14:47+00:00 heroku[slugc]: Slug compilation finished
2011-11-17T18:14:50+00:00 heroku[web.1]: Starting process with command `thin -p 19178 -e production -R /home/heroku_rack/heroku.ru start`
2011-11-17T18:14:50+00:00 app[web.1]: <internal:lib/rubygems/custom_require>:29:in `require': no such file to load -- sppin (LoadError)
2011-11-17T18:14:50+00:00 app[web.1]: from <internal:lib/rubygems/custom_require>:29:in `require'
2011-11-17T18:14:50+00:00 app[web.1]: from config.ru:1:in `block (3 levels) in <main>'
2 011-11-17T18:14:50+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:23:in `eval'
2011-11-17T18:14:50+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:23:in `block (3 levels) in <main>'
2011-11-17T18:14:50+00:00 app[web.1]: from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/rack-1.1.0/lib/rack/builder.rb:46:in `instance_eval'
2011-11-17T18:14:50+00:00 app[web.1]: from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/rack-1.1.0/lib/rack/builder.rb:46:in `initialize'
2011-11-17T18:14:50+00:00 app[web.1]: from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/rack-1.1.0/lib/rack/builder.rb:63:in `new'
2011-11-17T18:14:50+00:00 app[web.1]: from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/rack-1.1.0/lib/rack/builder.rb:63:in `map'
2011-11-17T18:14:50+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:18:in `block (2 levels) in <main>'
2011-11-17T18:14:50+00:00 app[web.1]: from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/rack-1.1.0/lib/rack/builder.rb:46:in `instance_eval'
2011-11-17T18:14:50+00:00 app[web.1]: from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/rack-1.1.0/lib/rack/builder.rb:46:in `initialize'
2011-11-17T18:14:50+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:11:in
2011-11-17T18:14:50+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:11:in `block in <main>'
2011-11-17T18:14:50+00:00 app[web.1]: from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/rack-1.1.0/lib/rack/builder.rb:46:in `instance_eval'
2011-11-17T18:14:50+00:00 app[web.1]: from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/rack-1.1.0/lib/rack/builder.rb:46:in `initialize'
2011-11-17T18:14:50+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:1:in `new'
2011-11-17T18:14:50+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:1:in `<main>'
2011-11-17T18:14:50+00:00 app[web.1]: from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/thin-1.2.6/lib/rack/adapter/loader.rb:36:in `eval'
2011-11-17T18:14:50+00:00 app[web.1]: from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/thin-1.2.6/lib/rack/adapter/loader.rb:36:in `load'
2011-11-17T18:14:50+00:00 app[web.1]: from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/thin-1.2.6/lib/thin/controllers/controller.rb:175:in `load_rackup_config'
2011-11-17T18:14:50+00:00 app[web.1]: from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/thin-1.2.6/lib/thin/controllers/controller.rb:65:in `start'
2011-11-17T18:14:50+00:00 app[web.1]: from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/thin-1.2.6/lib/thin/runner.rb:177:in `run_command'
2011-11-17T18:14:50+00:00 app[web.1]: from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/thin-1.2.6/lib/thin/runner.rb:143:in `run!'
2011-11-17T18:14:50+00:00 app[web.1]: from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/thin-1.2.6/bin/thin:6:in `<top (required)>'
2011-11-17T18:14:50+00:00 app[web.1]: from /usr/ruby1.9.2/bin/thin:19:in `load'
2011-11-17T18:14:50+00:00 app[web.1]: from /usr/ruby1.9.2/bin/thin:19:in `<main>'
2011-11-17T18:14:50+00:00 heroku[web.1]: Process exited
2011-11-17T18:14:51+00:00 heroku[web.1]: State changed from starting to crashed
2011-11-17T18:14:52+00:00 heroku[router]: Error H10 (App crashed) -> GET freezing-sky-8753.heroku.com/ dyno= queue= wait= service= status=503 bytes=
2011-11-17T18:14:52+00:00 heroku[nginx]: 150.164.3.247 - - [17/Nov/2011:10:14:52 -0800] "GET / HTTP/1.1" 503 607 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.120 Safari/535.2" freezing-sky-8753.heroku.com
2011-11-17T18:14:53+00:00 heroku[router]: Error H10 (App crashed) -> GET freezing-sky-8753.heroku.com/favicon.ico dyno= queue= wait= service= status=503 bytes=
2011-11-17T18:14:53+00:00 heroku[nginx]: 150.164.3.247 - - [17/Nov/2011:10:14:53 -0800] "GET /favicon.ico HTTP/1.1" 503 607 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.120 Safari/535.2" freezing-sky-8753.heroku.com
config.ru:
require 'sppin'
run Sinatra::Application
И, просто для записи, мой файл sppin.rb: (довольно простые вещи)
require 'rubygems'
require 'sinatra'
require 'haml'
get '/' do
@title = "Sppin"
haml :index
end