2012-02-03 75 views
0

我想我推動我的主分支到heroku,但是當我訪問該頁面時,沒有任何文件結構存在。例如,如果我訪問http://heroku-site/pages/home我得到一個「我們很抱歉,但錯誤的東西錯誤」該應用程序在當地正常工作。我怎麼知道文件在那裏。這是我的步驟。不知道爲什麼它不起作用。如何判斷heroku是否推送正確的文件

1)GIT中狀態

2)GIT中添加。

3)git的承諾-m 「一些信息」

4)混帳推Heroku的主

Heroku的日誌

2012-02-03T02:44:22+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/actionpack-3.2.1/lib/action_dispatch/middleware/static.rb:53:in `call' 
2012-02-03T02:44:22+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/rack-cache-1.1/lib/rack/cache/context.rb:132:in `forward' 
2012-02-03T02:44:22+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/rack-cache-1.1/lib/rack/cache/context.rb:181:in `lookup' 
2012-02-03T02:44:22+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/rack-cache-1.1/lib/rack/cache/context.rb:65:in `call!' 
2012-02-03T02:44:22+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/railties-3.2.1/lib/rails/application.rb:220:in `call' 
2012-02-03T02:44:22+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/railties-3.2.1/lib/rails/railtie/configurable.rb:30:in `method_missing' 
2012-02-03T02:44:22+00:00 app[web.1]: /home/heroku_rack/lib/static_assets.rb:9:in `call' 
2012-02-03T02:44:22+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/rack-cache-1.1/lib/rack/cache/context.rb:50:in `call' 
2012-02-03T02:44:22+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/railties-3.2.1/lib/rails/engine.rb:479:in `call' 
2012-02-03T02:44:22+00:00 app[web.1]: /home/heroku_rack/lib/last_access.rb:15:in `call' 
2012-02-03T02:44:22+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:134:in `call' 
2012-02-03T02:44:22+00:00 heroku[router]: GET quiet-flower-7747.heroku.com/pages/home dyno=web.1 queue=0 wait=0ms service=8ms status=500 bytes=643 
2012-02-03T02:44:22+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/rack-1.4.1/lib/rack/urlmap.rb:64:in `block in call' 
2012-02-03T02:44:22+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/rack-1.4.1/lib/rack/urlmap.rb:49:in `each' 
2012-02-03T02:44:22+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/rack-1.4.1/lib/rack/urlmap.rb:49:in `call' 
2012-02-03T02:44:22+00:00 app[web.1]: /home/heroku_rack/lib/date_header.rb:14:in `call' 
2012-02-03T02:44:22+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:134:in `call' 
2012-02-03T02:44:22+00:00 app[web.1]: thin (1.2.6) lib/thin/connection.rb:76:in `block in pre_process' 
2012-02-03T02:44:22+00:00 app[web.1]: thin (1.2.6) lib/thin/connection.rb:74:in `catch' 
2012-02-03T02:44:22+00:00 app[web.1]: thin (1.2.6) lib/thin/connection.rb:57:in `process' 
2012-02-03T02:44:22+00:00 app[web.1]: thin (1.2.6) lib/thin/connection.rb:42:in `receive_data' 
2012-02-03T02:44:22+00:00 app[web.1]: thin (1.2.6) lib/thin/connection.rb:74:in `pre_process' 
2012-02-03T02:44:22+00:00 app[web.1]: eventmachine (0.12.10) lib/eventmachine.rb:256:in `run' 
2012-02-03T02:44:22+00:00 app[web.1]: thin (1.2.6) lib/thin/backends/base.rb:57:in `start' 
2012-02-03T02:44:22+00:00 app[web.1]: thin (1.2.6) lib/thin/server.rb:156:in `start' 
2012-02-03T02:44:22+00:00 app[web.1]: thin (1.2.6) lib/thin/controllers/controller.rb:80:in `start' 
2012-02-03T02:44:22+00:00 app[web.1]: thin (1.2.6) lib/thin/runner.rb:177:in `run_command' 
2012-02-03T02:44:22+00:00 app[web.1]: thin (1.2.6) lib/thin/runner.rb:143:in `run!' 
2012-02-03T02:44:22+00:00 app[web.1]: thin (1.2.6) bin/thin:6:in `<top (required)>' 
2012-02-03T02:44:22+00:00 app[web.1]: /usr/ruby1.9.2/bin/thin:19:in `load' 
2012-02-03T02:44:22+00:00 app[web.1]: /usr/ruby1.9.2/bin/thin:19:in `<main>' 
2012-02-03T02:44:22+00:00 app[web.1]: 
2012-02-03T02:44:22+00:00 app[web.1]: eventmachine (0.12.10) lib/eventmachine.rb:256:in `run_machine' 
2012-02-03T02:44:22+00:00 app[web.1]: 
2012-02-03T02:44:22+00:00 app[web.1]: cache: [GET /pages/home] miss 
2012-02-03T02:44:22+00:00 heroku[nginx]: 24.87.81.230 - - [03/Feb/2012:02:44:22 +0000] "GET /pages/home HTTP/1.1" 500 643 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/534.52.7 (KHTML, like Gecko) Version/5.1.2 Safari/534.52.7" quiet-flower-7747.heroku.com 
2012-02-03T02:46:45+00:00 app[web.1]: 
2012-02-03T02:46:45+00:00 app[web.1]: 
2012-02-03T02:46:45+00:00 app[web.1]: Started GET "/pages/home" for 24.87.81.230 at 2012-02-02 18:46:45 -0800 
2012-02-03T02:46:45+00:00 app[web.1]: 
2012-02-03T02:46:45+00:00 app[web.1]: ActiveRecord::ConnectionNotEstablished (ActiveRecord::ConnectionNotEstablished): 
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/activerecord-3.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:374:in `retrieve_connection' 
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/activerecord-3.2.1/lib/active_record/connection_adapters/abstract/connection_specification.rb:168:in `retrieve_connection' 
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/activerecord-3.2.1/lib/active_record/connection_adapters/abstract/connection_specification.rb:142:in `connection' 
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/activerecord-3.2.1/lib/active_record/query_cache.rb:67:in `rescue in call' 
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/activerecord-3.2.1/lib/active_record/query_cache.rb:61:in `call' 
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/activerecord-3.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:443:in `call' 
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/actionpack-3.2.1/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call' 
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/callbacks.rb:405:in `_run__2584572968946772396__call__962583124295019556__callbacks' 
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/callbacks.rb:405:in `__run_callback' 
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/callbacks.rb:385:in `_run_call_callbacks' 
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/callbacks.rb:81:in `run_callbacks' 
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/actionpack-3.2.1/lib/action_dispatch/middleware/callbacks.rb:27:in `call' 
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/actionpack-3.2.1/lib/action_dispatch/middleware/remote_ip.rb:31:in `call' 
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/actionpack-3.2.1/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call' 
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/actionpack-3.2.1/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call' 
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/railties-3.2.1/lib/rails/rack/logger.rb:26:in `call_app' 
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/railties-3.2.1/lib/rails/rack/logger.rb:16:in `call' 
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/actionpack-3.2.1/lib/action_dispatch/middleware/request_id.rb:22:in `call' 
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/rack-1.4.1/lib/rack/methodoverride.rb:21:in `call' 
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/rack-1.4.1/lib/rack/runtime.rb:17:in `call' 
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/rack-cache-1.1/lib/rack/cache/context.rb:132:in `forward' 
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/rack-cache-1.1/lib/rack/cache/context.rb:50:in `call' 
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/activesupport-3.2.1/lib/active_support/cache/strategy/local_cache.rb:72:in `call' 
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/rack-1.4.1/lib/rack/lock.rb:15:in `call' 
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/actionpack-3.2.1/lib/action_dispatch/middleware/static.rb:53:in `call' 
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/rack-cache-1.1/lib/rack/cache/context.rb:181:in `lookup' 
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/railties-3.2.1/lib/rails/engine.rb:479:in `call' 
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/railties-3.2.1/lib/rails/application.rb:220:in `call' 
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/rack-cache-1.1/lib/rack/cache/context.rb:241:in `fetch' 
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/rack-cache-1.1/lib/rack/cache/context.rb:65:in `call!' 
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/railties-3.2.1/lib/rails/railtie/configurable.rb:30:in `method_missing' 
2012-02-03T02:46:45+00:00 app[web.1]: /home/heroku_rack/lib/static_assets.rb:9:in `call' 
2012-02-03T02:46:45+00:00 app[web.1]: /home/heroku_rack/lib/last_access.rb:15:in `call' 
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:134:in `call' 
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/rack-1.4.1/lib/rack/urlmap.rb:64:in `block in call' 
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/rack-1.4.1/lib/rack/urlmap.rb:49:in `each' 
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/rack-1.4.1/lib/rack/urlmap.rb:49:in `call' 
2012-02-03T02:46:45+00:00 app[web.1]: /home/heroku_rack/lib/date_header.rb:14:in `call' 
2012-02-03T02:46:45+00:00 app[web.1]: .bundle/gems/ruby/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:134:in `call' 
2012-02-03T02:46:45+00:00 heroku[router]: GET quiet-flower-7747.heroku.com/pages/home dyno=web.1 queue=0 wait=0ms service=11ms status=500 bytes=643 
2012-02-03T02:46:45+00:00 app[web.1]: thin (1.2.6) lib/thin/connection.rb:74:in `catch' 
2012-02-03T02:46:45+00:00 app[web.1]: thin (1.2.6) lib/thin/connection.rb:74:in `pre_process' 
2012-02-03T02:46:45+00:00 app[web.1]: thin (1.2.6) lib/thin/connection.rb:57:in `process' 
2012-02-03T02:46:45+00:00 app[web.1]: thin (1.2.6) lib/thin/connection.rb:42:in `receive_data' 
2012-02-03T02:46:45+00:00 app[web.1]: eventmachine (0.12.10) lib/eventmachine.rb:256:in `run_machine' 
2012-02-03T02:46:45+00:00 app[web.1]: eventmachine (0.12.10) lib/eventmachine.rb:256:in `run' 
2012-02-03T02:46:45+00:00 app[web.1]: thin (1.2.6) lib/thin/backends/base.rb:57:in `start' 
2012-02-03T02:46:45+00:00 app[web.1]: thin (1.2.6) lib/thin/server.rb:156:in `start' 
2012-02-03T02:46:45+00:00 app[web.1]: thin (1.2.6) lib/thin/controllers/controller.rb:80:in `start' 
2012-02-03T02:46:45+00:00 app[web.1]: thin (1.2.6) lib/thin/connection.rb:76:in `block in pre_process' 
2012-02-03T02:46:45+00:00 app[web.1]: thin (1.2.6) bin/thin:6:in `<top (required)>' 
2012-02-03T02:46:45+00:00 app[web.1]: thin (1.2.6) lib/thin/runner.rb:143:in `run!' 
2012-02-03T02:46:45+00:00 app[web.1]: thin (1.2.6) lib/thin/runner.rb:177:in `run_command' 
2012-02-03T02:46:45+00:00 app[web.1]: 
2012-02-03T02:46:45+00:00 app[web.1]: /usr/ruby1.9.2/bin/thin:19:in `load' 
2012-02-03T02:46:45+00:00 app[web.1]: /usr/ruby1.9.2/bin/thin:19:in `<main>' 
2012-02-03T02:46:45+00:00 app[web.1]: 
2012-02-03T02:46:45+00:00 app[web.1]: cache: [GET /pages/home] miss 
2012-02-03T02:46:46+00:00 heroku[nginx]: 24.87.81.230 - - [03/Feb/2012:02:46:46 +0000] "GET /pages/home HTTP/1.1" 500 643 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/534.52.7 (KHTML, like Gecko) Version/5.1.2 Safari/534.52.7" quiet-flower-7747.heroku.com 
+0

'$ heroku logs'的輸出是什麼?它應該給出它爲什麼拋出一個錯誤的想法。 – pjumble 2012-02-03 03:04:40

+0

我添加了heroku輸出,對不起,你說的日誌。解決這個問題 – 2012-02-03 03:11:44

+0

你在使用數據庫嗎?如果是這樣你配置了pgsql(pg gem)並運行heroku rake db:migrate? – pjumble 2012-02-03 03:18:55

回答

1

你的問題就出在這裏:

ActiveRecord::ConnectionNotEstablished (ActiveRecord::ConnectionNotEstablished):

我注意到你正在使用EventMachine的,然後讓我問你是如何連接到數據庫。確保您使用ENV [「DATABASE_URL」]作爲數據庫連接。

0

如果你的庫文件都是由有你可以告訴從你的Heroku git repo克隆到你機器上的其他目錄,並確保它們都在那裏。

當你說「當我訪問頁面時,沒有任何文件結構存在」,你是什麼意思?

如果/pages/home應該顯示文件系統中的文件列表,那麼這在Heroku中可能不起作用。我知道你的Dyno看到一個只讀文件系統,他們也可能在那裏做一些其他有趣的東西。

相關問題