簡體   English   中英

heroku運行分離的耙數據庫設置錯誤

[英]heroku run detached rake db setup error

我正在關注[Ruby on Rails教程, http://railsinstallfest.org/guides/installfest/getting_started/ ,但是在Heroku上運行我的應用程序時遇到了麻煩。 我希望找到可以幫助我的人。

這是我的問題的日志,它是在運行命令時生成的

heroku run:分離耙db:setup

2014-01-19T07:49:39.839922+00:00 app[run.4729]:    -> 0.1320s
2014-01-19T07:49:39.839922+00:00 app[run.4729]: -- create_table("comments", {:force=>true})
2014-01-19T07:49:39.839922+00:00 app[run.4729]: -- add_index("comments", ["post_id"], {:name=>"index_comments_on_post_id", :using=>:btree})
2014-01-19T07:49:39.839922+00:00 app[run.4729]:    -> 0.0365s
2014-01-19T07:49:39.839922+00:00 app[run.4729]: -- create_table("posts", {:force=>true})
2014-01-19T07:49:39.839922+00:00 app[run.4729]: -- initialize_schema_migrations_table()
2014-01-19T07:49:39.839922+00:00 app[run.4729]:    -> 1.0849s
2014-01-19T07:49:39.839922+00:00 app[run.4729]:    -> 0.0030s
2014-01-19T07:49:39.839922+00:00 app[run.4729]:    -> 0.0897s
2014-01-19T07:49:41.011590+00:00 heroku[run.4729]: Process exited with status 0
2014-01-19T07:49:41.028919+00:00 heroku[run.4729]: State changed from up to complete
2014-01-19T08:19:28.504357+00:00 heroku[api]: Starting process with command `bundle exec rake db:migrate` by fcamatti@gmail.com
2014-01-19T08:19:32.472345+00:00 heroku[run.8654]: Starting process with command `bundle exec rake db:migrate`
2014-01-19T08:19:33.081263+00:00 heroku[run.8654]: State changed from starting to up
2014-01-19T08:19:36.539370+00:00 heroku[run.8654]: Process exited with status 0
2014-01-19T08:19:36.559509+00:00 heroku[run.8654]: State changed from up to complete
2014-01-19T08:20:14.858681+00:00 heroku[web.1]: Unidling
2014-01-19T08:20:14.858681+00:00 heroku[web.1]: State changed from down to starting
2014-01-19T08:20:17.912642+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 3628 -e $RAILS_ENV`
2014-01-19T08:20:20.280071+00:00 app[web.1]: [2014-01-19 08:20:20] INFO  WEBrick 1.3.1
2014-01-19T08:20:20.280071+00:00 app[web.1]: [2014-01-19 08:20:20] INFO  ruby 2.0.0 (2013-11-22) [x86_64-linux]
2014-01-19T08:20:20.280071+00:00 app[web.1]: [2014-01-19 08:20:20] INFO  WEBrick::HTTPServer#start: pid=2 port=3628
2014-01-19T08:20:20.797806+00:00 heroku[web.1]: State changed from starting to up
2014-01-19T08:20:22.002181+00:00 heroku[router]: at=info method=GET path=/ host=shrouded-hamlet-9456.herokuapp.com request_id=9b341ac3-c58c-489b-ad47-91076a5f762d fwd="124.149.104.105" dyno=web.1 connect=1ms service=88ms status=404 bytes=1351
2014-01-19T08:20:25.860279+00:00 heroku[router]: at=info method=GET path=/favicon.ico host=shrouded-hamlet-9456.herokuapp.com request_id=76b6c4db-a957-4831-b86d-eeae8a5f25bb fwd="124.149.104.105" dyno=web.1 connect=1ms service=8ms status=404 bytes=1351
2014-01-19T09:25:18.132575+00:00 heroku[web.1]: Idling
2014-01-19T09:25:18.133586+00:00 heroku[web.1]: State changed from up to down
2014-01-19T09:25:20.870101+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2014-01-19T09:25:21.483722+00:00 app[web.1]:    /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:160:in `start'
2014-01-19T09:25:21.483722+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/commands.rb:71:in `tap'
2014-01-19T09:25:21.483924+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/commands.rb:71:in `<top (required)>'
2014-01-19T09:25:21.483722+00:00 app[web.1]: [2014-01-19 09:25:21] FATAL SignalException: SIGTERM
2014-01-19T09:25:21.483722+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/server.rb:264:in `start'
2014-01-19T09:25:21.483722+00:00 app[web.1]:    /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:170:in `block in start'
2014-01-19T09:25:21.483722+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/commands/server.rb:84:in `start'
2014-01-19T09:25:21.483722+00:00 app[web.1]:    /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:170:in `select'
2014-01-19T09:25:21.483722+00:00 app[web.1]:    /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:32:in `start'
2014-01-19T09:25:21.483722+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/handler/webrick.rb:14:in `run'
2014-01-19T09:25:21.483924+00:00 app[web.1]:    bin/rails:4:in `require'
2014-01-19T09:25:21.483924+00:00 app[web.1]:    bin/rails:4:in `<main>'
2014-01-19T09:25:21.484393+00:00 app[web.1]: [2014-01-19 09:25:21] INFO  WEBrick::HTTPServer#start done.
2014-01-19T09:25:21.483722+00:00 app[web.1]:    /app/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/commands.rb:76:in `block in <top (required)>'
2014-01-19T09:25:21.483924+00:00 app[web.1]: [2014-01-19 09:25:21] INFO  going to shutdown ...
2014-01-19T09:25:21.510762+00:00 app[web.1]: => Booting WEBrick
2014-01-19T09:25:21.510762+00:00 app[web.1]: => Rails 4.0.2 application starting in production on http://0.0.0.0:3628
2014-01-19T09:25:21.510762+00:00 app[web.1]: => Ctrl-C to shutdown server
2014-01-19T09:25:21.510762+00:00 app[web.1]: => Run `rails server -h` for more startup options
2014-01-19T09:25:21.510762+00:00 app[web.1]: F, [2014-01-19T08:20:22.006714 #2] FATAL -- : 
2014-01-19T09:25:21.510762+00:00 app[web.1]: I, [2014-01-19T08:20:21.933721 #2]  INFO -- : Started GET "/" for 124.149.104.105 at 2014-01-19 08:20:21 +0000
2014-01-19T09:25:21.510762+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.2/lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
2014-01-19T09:25:21.510762+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.2/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
2014-01-19T09:25:21.510762+00:00 app[web.1]: ActionController::RoutingError (No route matches [GET] "/"):
2014-01-19T09:25:21.510762+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/rack/logger.rb:38:in `call_app'
2014-01-19T09:25:21.510982+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/rack/logger.rb:20:in `block in call'
2014-01-19T09:25:21.510982+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/tagged_logging.rb:67:in `block in tagged'
2014-01-19T09:25:21.510982+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/methodoverride.rb:21:in `call'
2014-01-19T09:25:21.510982+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/tagged_logging.rb:67:in `tagged'
2014-01-19T09:25:21.510982+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/tagged_logging.rb:25:in `tagged'
2014-01-19T09:25:21.510982+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.2/lib/action_dispatch/middleware/request_id.rb:21:in `call'
2014-01-19T09:25:21.510982+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/rack/logger.rb:20:in `call'
2014-01-19T09:25:21.511133+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/application.rb:97:in `call'
2014-01-19T09:25:21.510982+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/runtime.rb:17:in `call'
2014-01-19T09:25:21.510982+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/cache/strategy/local_cache.rb:83:in `call'
2014-01-19T09:25:21.510982+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/sendfile.rb:112:in `call'
2014-01-19T09:25:21.511133+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/engine.rb:511:in `call'
2014-01-19T09:25:21.511133+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/lock.rb:17:in `call'
2014-01-19T09:25:21.511133+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/content_length.rb:14:in `call'
2014-01-19T09:25:21.511133+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/handler/webrick.rb:60:in `service'
2014-01-19T09:25:21.511133+00:00 app[web.1]:   vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `service'
2014-01-19T09:25:21.511133+00:00 app[web.1]:   vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread'
2014-01-19T09:25:21.511133+00:00 app[web.1]:   vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run'
2014-01-19T09:25:21.511133+00:00 app[web.1]: 
2014-01-19T09:25:21.511566+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.2/lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
2014-01-19T09:25:21.511566+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/rack/logger.rb:20:in `block in call'
2014-01-19T09:25:21.511566+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/rack/logger.rb:38:in `call_app'
2014-01-19T09:25:21.511566+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/tagged_logging.rb:25:in `tagged'
2014-01-19T09:25:21.511566+00:00 app[web.1]: I, [2014-01-19T08:20:25.859873 #2]  INFO -- : Started GET "/favicon.ico" for 124.149.104.105 at 2014-01-19 08:20:25 +0000
2014-01-19T09:25:21.511566+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/tagged_logging.rb:67:in `tagged'
2014-01-19T09:25:21.511566+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/tagged_logging.rb:67:in `block in tagged'
2014-01-19T09:25:21.511133+00:00 app[web.1]: 
2014-01-19T09:25:21.511566+00:00 app[web.1]: ActionController::RoutingError (No route matches [GET] "/favicon.ico"):
2014-01-19T09:25:21.511713+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/application.rb:97:in `call'
2014-01-19T09:25:21.511713+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/lock.rb:17:in `call'
2014-01-19T09:25:21.511566+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.2/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
2014-01-19T09:25:21.511713+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/rack/logger.rb:20:in `call'
2014-01-19T09:25:21.512033+00:00 app[web.1]:   vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `service'
2014-01-19T09:25:21.511566+00:00 app[web.1]: F, [2014-01-19T08:20:25.861261 #2] FATAL -- : 
2014-01-19T09:25:21.511713+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/methodoverride.rb:21:in `call'
2014-01-19T09:25:21.511713+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/cache/strategy/local_cache.rb:83:in `call'
2014-01-19T09:25:21.511713+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/runtime.rb:17:in `call'
2014-01-19T09:25:21.511713+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/engine.rb:511:in `call'
2014-01-19T09:25:21.511713+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.2/lib/action_dispatch/middleware/request_id.rb:21:in `call'
2014-01-19T09:25:21.512033+00:00 app[web.1]:   vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run'
2014-01-19T09:25:21.512033+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/handler/webrick.rb:60:in `service'
2014-01-19T09:25:21.511713+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/sendfile.rb:112:in `call'
2014-01-19T09:25:21.511713+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/content_length.rb:14:in `call'
2014-01-19T09:25:21.512033+00:00 app[web.1]:   vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread'
2014-01-19T09:25:21.512033+00:00 app[web.1]: 
2014-01-19T09:25:21.512033+00:00 app[web.1]: 
2014-01-19T09:25:21.512033+00:00 app[web.1]: Exiting
2014-01-19T09:25:22.825919+00:00 heroku[web.1]: Process exited with status 143

您的教程中的config / routes.rb文件似乎缺少根路徑。 該行被注釋:

QuickBlog::Application.routes.draw do
  resources :posts do
    resources :comments, :only => [:create]
  end

  # root :to => 'welcome#index'
end


在您的日志中,您可以看到這被視為致命錯誤:

ActionController :: RoutingError(沒有路由與[GET]“ /”匹配):

我對此不太確定,但是Heroku會不會抱怨您的應用程序沒有“入口”點嗎? 您的教程以Rails 3.2為前提,日志告訴您使用Rails 4.0.2。

以下是Heroku文檔關於此版本的說明:

Rails 4在生產中不再具有靜態索引頁。 當您使用新應用程序時,生產環境中將不會有根頁面,因此我們需要創建一個根頁面。


我希望這有幫助。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM