2012-04-18 121 views
2

我似乎有真正的麻煩,同時部署時,我不太確定錯誤和觸發它。一切似乎都在本地使用生產模式。請幫我理解這個錯誤並部署我的應用程序。部署紅寶石軌道上的Herokuku雪松錯誤

現在,我刪除.git文件夾,並創建一個新的雪松應用程序,然後再次嘗試,但像往常一樣有一些錯誤。但是,這次錯誤看起來不一樣。我的寶石文件和最近的heroku日誌如下;

的Gemfile

source 'https://rubygems.org' 
gem 'rails', '3.2.2' 
group :test, :development do 
    gem 'sqlite3' 
    gem 'rspec-rails' 
    gem 'factory_girl' 
    gem 'spork' 
    gem 'annotate', :git => "https://github.com/ctran/annotate_models.git" 
end 

group :production do 
    gem 'pg' 
    gem 'thin' 
end 
group :assets do 
    gem 'sass-rails', '~> 3.2.3' 
    gem 'coffee-rails', '~> 3.2.1' 
    gem 'uglifier', '>= 1.0.3' 
    gem 'haml' 
end 
gem 'jquery-rails' 
gem 'heroku' 

最近的日誌

2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:38:in `receive_data' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/bin/thin:6:in `<top (required)>' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/bin/thin:19:in `load' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/bin/thin:19:in `<main>' 
2012-04-18T13:59:38+00:00 app[web.1]: Completed 500 Internal Server Error in 128ms 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.2/lib/action_view/lookup_context.rb:109:in `find' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.2/lib/action_controller/metal/compatibility.rb:50:in `render_to_body' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.2/lib/action_controller/metal/instrumentation.rb:39:in `render' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.2/lib/abstract_controller/callbacks.rb:17:in `process_action' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.2/lib/abstract_controller/rendering.rb:45:in `process' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/journey-1.0.3/lib/journey/router.rb:56:in `call' 
2012-04-18T13:59:38+00:00 app[web.1]: Processing by PagesController#home as HTML 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:200:in `call' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.2/lib/action_dispatch/middleware/callbacks.rb:27:in `call' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/lock.rb:15:in `call' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/thin/server.rb:159:in `start' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.2/lib/action_view/renderer/template_renderer.rb:29:in `determine_template' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.2/lib/action_controller/metal/instrumentation.rb:40:in `block (2 levels) in render' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.2/lib/abstract_controller/base.rb:167:in `process_action' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.2/lib/active_support/notifications.rb:123:in `block in instrument' 
2012-04-18T13:59:38+00:00 app[web.1]: 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.2/lib/action_controller/metal.rb:246:in `block in action' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:443:in `call' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.2/lib/action_view/renderer/renderer.rb:36:in `render_template' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.2/lib/active_support/core_ext/benchmark.rb:5:in `block in ms' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.2/lib/action_controller/metal/rendering.rb:10:in `process_action' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.2/lib/active_support/notifications/instrumenter.rb:20:in `instrument' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.2/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.2/lib/action_dispatch/middleware/static.rb:61:in `call' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:80:in `block in pre_process' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.2/lib/action_dispatch/routing/route_set.rb:67:in `call' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/etag.rb:23:in `call' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.2/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/thin/controllers/controller.rb:86:in `start' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/railties-3.2.2/lib/rails/rack/logger.rb:26:in `call_app' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:245:in `fetch' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:78:in `pre_process' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/thin/runner.rb:151:in `run!' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.2/lib/action_view/path_set.rb:58:in `find' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.2/lib/action_controller/metal/renderers.rb:28:in `render_to_body' 
2012-04-18T13:59:38+00:00 app[web.1]:): 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.2/lib/abstract_controller/rendering.rb:103:in `render_to_body' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.2/lib/action_view/renderer/template_renderer.rb:10:in `render' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.2/lib/action_controller/metal/instrumentation.rb:83:in `cleanup_view_runtime' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.2/lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.2/lib/active_record/railties/controller_runtime. 
rb:18:in `process_action' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/journey-1.0.3/lib/journey/router.rb:68:in `block in call' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.2/lib/active_record/railties/controller_runtime.rb:24:in `cleanup_view_runtime' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.2/lib/active_support/callbacks.rb:81:in `run_callbacks' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.2/lib/abstract_controller/base.rb:121:in `process' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/journey-1.0.3/lib/journey/router.rb:56:in `each' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.2/lib/action_controller/metal/rendering.rb:16:in `render' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.2/lib/action_controller/metal/implicit_render.rb:5:in `send_action' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.2/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.2/lib/action_view/renderer/abstract_renderer.rb:3:in `find_template' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.2/lib/abstract_controller/rendering.rb:88:in `render' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.2/lib/action_controller/metal/implicit_render.rb:10:in `default_render' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.2/lib/action_dispatch/middleware/flash.rb:242:in `call' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.2/lib/active_support/callbacks.rb:385:in `_run_call_callbacks' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/runtime.rb:17:in `call' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:205:in `context' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.2/lib/active_support/callbacks.rb:81:in `run_callbacks' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/railties-3.2.2/lib/rails/application.rb:220:in `call' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.2/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.2/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.2/lib/active_record/query_cache.rb:64:in `call' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.2/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.2/lib/action_controller/metal/rescue.rb:29:in `process_action' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.2/lib/action_controller/metal.rb:203:in `dispatch' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.2/lib/action_dispatch/routing/route_set.rb:594:in `call' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.2/lib/action_dispatch/middleware/cookies.rb:338:in `call' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/railties-3.2.2/lib/rails/engine.rb:479:in `call' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run_machine' 
2012-04-18T13:59:38+00:00 app[web.1]: 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run' 
2012-04-18T13:59:38+00:00 app[web.1]: 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:136:in `forward' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/thin/connection.rb:78:in `catch' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor 
/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/thin/runner.rb:185:in `run_command' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.2/lib/action_dispatch/middleware/remote_ip.rb:31:in `call' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.2/lib/active_support/cache/strategy/local_cache.rb:72:in `call' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/railties-3.2.2/lib/rails/railtie/configurable.rb:30:in `method_missing' 
2012-04-18T13:59:38+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/thin-1.3.1/lib/thin/backends/base.rb:61:in `start' 
2012-04-18T13:59:38+00:00 app[web.1]: cache: [GET /] miss 
2012-04-18T13:59:38+00:00 app[web.1]: cache: [GET /favicon.ico] miss, store 
2012-04-18T13:59:38+00:00 heroku[router]: GET k6skrd.herokuapp.com/favicon.ico dyno=web.1 queue=0 wait=0ms service=7ms status=200 bytes=0 
2012-04-18T14:01:49+00:00 heroku[web.1]: State changed from up to bouncing 
2012-04-18T14:01:49+00:00 heroku[web.1]: State changed from bouncing to created 
2012-04-18T14:01:49+00:00 heroku[web.1]: State changed from created to starting 
2012-04-18T14:01:51+00:00 heroku[web.1]: Stopping process with SIGTERM 
2012-04-18T14:01:57+00:00 heroku[web.1]: Starting process with command `bundle exec thin start -R config.ru -e production -p 13819` 
2012-04-18T14:01:59+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/01/04/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5) 
2012-04-18T14:01:59+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/01/04/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5) 
2012-04-18T14:02:01+00:00 heroku[web.1]: Error R12 (Exit timeout) -> Process failed to exit within 10 seconds of SIGTERM 
2012-04-18T14:02:01+00:00 heroku[web.1]: Stopping process with SIGKILL 
2012-04-18T14:02:03+00:00 heroku[web.1]: Process exited with status 137 
2012-04-18T14:02:03+00:00 app[web.1]: >> Thin web server (v1.3.1 codename Triple Espresso) 
2012-04-18T14:02:03+00:00 app[web.1]: >> Maximum connections set to 1024 
2012-04-18T14:02:03+00:00 app[web.1]: >> Listening on 0.0.0.0:13819, CTRL+C to stop 
2012-04-18T14:02:04+00:00 heroku[web.1]: State changed from starting to up 

您的幫助將非常感激。謝謝你提供的任何幫助。

+1

你確定你發佈了所有東西嗎?我看不到生成此堆棧跟蹤的異常名稱。 – forker 2012-04-18 08:14:03

+0

我編輯了日誌以列出所有這些日誌。 – Sandeep 2012-04-18 12:30:47

回答

1

嗯,我只是去你的網站,它已關閉,但有一個奇怪的404頁面。檢查日誌並立即看到。另外,請嘗試重新啓動。這聽起來很愚蠢,但誰知道。也許你的精簡設置也是錯誤的?

+0

這似乎是瘦設置是錯誤的,但我如何設置瘦,因爲我使用默認設置,並沒有定義proc文件在這一刻。 – Sandeep 2012-04-18 14:26:50

+0

如果你沒有Procfile,Heroku會爲你定義一個web進程,它被定義爲'web:bundle exec thin start -e $ RAILS_ENV -p $ PORT' [記錄在這裏](https://devcenter.heroku。 com/articles/ruby​​-support)(假設你使用的是薄寶石) – 2012-04-18 15:56:17

1

測試從Gemfile中刪除寶石「薄」

+1

我試着從Gemfile中刪除gem'thin'並刪除了procfile並嘗試了它,但似乎沒有工作。 – Sandeep 2012-04-18 12:31:33