如何判断heroku是否正在推送正确的文件

时间:2012-02-03 03:01:42

标签: heroku push commit

我想我正在将我的主分支推送到heroku,但是当我访问该页面时,没有任何文件结构存在。例如,如果我访问http://heroku-site/pages/home我得到一个“我们很抱歉但错误的错误”该应用程序在本地工作正常。我怎么知道文件在那里。这是我的步骤。不知道为什么它不起作用。

1)git status

2)git add。

3)git commit -m“Some Message”

4)git push heroku master

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

2 个答案:

答案 0 :(得分:1)

你的答案就在这里:

ActiveRecord::ConnectionNotEstablished (ActiveRecord::ConnectionNotEstablished):

我注意到你正在使用EventMachine,然后引导我询问你是如何连接到数据库的。确保您使用ENV [“DATABASE_URL”]作为数据库连接。

答案 1 :(得分:0)

你可以通过从你的Heroku git repo克隆到你机器上的其他目录来确定你的存储库文件是否在那里,并确保它们都在那里。

当你说“当我访问该页面时,没有任何文件结构存在”时,你的意思是什么?

如果/pages/home应该显示文件系统中的文件列表,那么这可能在Heroku中不起作用。我知道你的Dyno看到了一个只读文件系统,他们也可能会在那里做一些有趣的事情。