2012-02-03 6 views
0

はコードです:ヘロウクのHello World Sinatraアプリのデプロイに関する問題。ここ

# helloworld.rb 

require 'sinatra' 

get '/' do 
'Hello world! Welcome to the root!' 
end 

と私はHerokuのにデプロイするとき、私は私のログにこれを取得する:

2012-02-03T23:18:46+00:00 heroku[web.1]: State changed from crashed to created 
2012-02-03T23:18:46+00:00 heroku[web.1]: State changed from created to starting 
2012-02-03T23:18:47+00:00 heroku[slugc]: Slug compilation finished 
2012-02-03T23:18:48+00:00 heroku[web.1]: Starting process with command `thin -p 17403 -e production -R /home/heroku_rack/heroku.ru start` 
2012-02-03T23:18:49+00:00 app[web.1]: <internal:lib/rubygems/custom_require>:29:in `require': no such file to load -- helloworld (LoadError) 
2012-02-03T23:18:49+00:00 app[web.1]: from <internal:lib/rubygems/custom_require>:29:in `require' 
2012-02-03T23:18:49+00:00 app[web.1]: from config.ru:1:in `block (3 levels) in <main>' 
2012-02-03T23:18:49+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:23:in `eval' 
2012-02-03T23:18:49+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:23:in `block (3 levels) in <main>' 
2012-02-03T23:18:49+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' 
2012-02-03T23:18:49+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' 
2012-02-03T23:18:49+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' 
2012-02-03T23:18:49+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' 
2012-02-03T23:18:49+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:18:in `block (2 levels) in <main>' 
2012-02-03T23:18:49+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' 
2012-02-03T23:18:49+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:11:in `new' 
2012-02-03T23:18:49+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' 
2012-02-03T23:18:49+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:11:in `block in <main>' 
2012-02-03T23:18:49+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' 
2012-02-03T23:18:49+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' 
2012-02-03T23:18:49+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:1:in `new' 
2012-02-03T23:18:49+00:00 app[web.1]: from /home/heroku_rack/heroku.ru:1:in `<main>' 
2012-02-03T23:18:49+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' 
2012-02-03T23:18:49+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' 
2012-02-03T23:18:49+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' 
2012-02-03T23:18:49+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' 
2012-02-03T23:18:49+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!' 
2012-02-03T23:18:49+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' 
2012-02-03T23:18:49+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)>' 
2012-02-03T23:18:49+00:00 app[web.1]: from /usr/ruby1.9.2/bin/thin:19:in `load' 
2012-02-03T23:18:49+00:00 app[web.1]: from /usr/ruby1.9.2/bin/thin:19:in `<main>' 
2012-02-03T23:18:50+00:00 heroku[web.1]: State changed from starting to crashed 
2012-02-03T23:18:51+00:00 heroku[web.1]: Process exited 
2012-02-03T23:18:57+00:00 heroku[router]: Error H10 (App crashed) -> GET alterra.heroku.com/ dyno= queue= wait= service= status=503 bytes= 
2012-02-03T23:18:57+00:00 heroku[nginx]: 129.89.10.150 - - [03/Feb/2012:23:18:57 +0000] "GET/HTTP/1.1" 503 607 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_7) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.46 Safari/535.11" alterra.heroku.com 

私はこれに完全に新しいので、私は私が何か間違ったことをやっていると仮定します何かを含めるのを忘れてしまった。私はちょうどH10のアプリケーションクラッシュエラーとアプリケーションエラーのページを取得します。

+0

あなたが何を期待しているか、あなたが試したことなどは潜在的な回答者に役立つかもしれません –

答えて

0

config.ruあなたはこれが現在のディレクトリがロード・パスにもはやであるRubyの1.9.2で導入された変更です

require './helloworld' 

require 'helloworld' 

を変更する必要がで。これがローカルマシン上で動作している場合は、Ruby 1.8.7を使用している可能性があります。この場合、1.9.2にアップグレードすることを検討する価値があります。

+0

素晴らしい、ありがとう!私もGemfileは持っていませんでした。私は新しいモデルMacBook Proで1.9.2を実行しています。マシン上でSinatraを実行すると、Gemfileやconfig.ruファイルがないかどうか気にしないようです。これの多くは私には新しいものです。再度、感謝します! –

+0

ああ、okだから、あなたは 'ruby helloworld.rb'でローカルに走っています。 'config.ru'をローカルでテストしたい場合は' rackup'と入力するか、Thinがインストールされている場合は 'thin start'と入力してください。これはおそらくHeroku上で使用するものです。 – matt

関連する問題