2017-08-11 114 views
1

我正在處理我的第一個Rails應用程序。我在Windows中,所以我在Cloud9中構建它,然後將它部署到Heroku。在我的Heroku儀表板中,該應用看起來很好,但應用頁面給我的信息是:The page you were looking for doesn't exist.經過一番搜索之後,似乎我需要運行heroku run rake db:migrate來遷移數據庫,但這沒有幫助。Cloud9上的Ruby on Rails應用程序「在Heroku上不存在」

這裏是我的Heroku的日誌: heroku-cli: This CLI is deprecated. Please reinstall from https://cli.heroku.com 2017-08-11T01:43:05.558405+00:00 app[web.1]: [4ba2946c-ac27-40e5-9103-3e816be754f3] Started GET "/" for 99.120.160.17 at 2017-08-11 01:43:05 +0000 2017-08-11T01:43:05.558994+00:00 app[web.1]: [4ba2946c-ac27-40e5-9103-3e816be754f3]
2017-08-11T01:43:05.559041+00:00 app[web.1]: [4ba2946c-ac27-40e5-9103-3e816be754f3] ActionController::RoutingError (No route matches [GET] "/"): 2017-08-11T01:43:05.559084+00:00 app[web.1]: [4ba2946c-ac27-40e5-9103-3e816be754f3]
2017-08-11T01:43:05.559167+00:00 app[web.1]: [4ba2946c-ac27-40e5-9103-3e816be754f3] vendor/bundle/ruby/2.3.0/gems/actionpack-5.1.3/lib/action_dispatch/middleware/debug_exceptions.rb:63:in `call' 2017-08-11T01:43:05.559168+00:00 app[web.1]: [4ba2946c-ac27-40e5-9103-3e816be754f3] vendor/bundle/ruby/2.3.0/gems/actionpack-5.1.3/lib/action_dispatch/middleware/show_exceptions.rb:31:in `call' 2017-08-11T01:43:05.559169+00:00 app[web.1]: [4ba2946c-ac27-40e5-9103-3e816be754f3] vendor/bundle/ruby/2.3.0/gems/railties-5.1.3/lib/rails/rack/logger.rb:36:in `call_app' 2017-08-11T01:43:05.559171+00:00 app[web.1]: [4ba2946c-ac27-40e5-9103-3e816be754f3] vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.3/lib/active_support/tagged_logging.rb:69:in `block in tagged' 2017-08-11T01:43:05.559170+00:00 app[web.1]: [4ba2946c-ac27-40e5-9103-3e816be754f3] vendor/bundle/ruby/2.3.0/gems/railties-5.1.3/lib/rails/rack/logger.rb:24:in `block in call' 2017-08-11T01:43:05.559171+00:00 app[web.1]: [4ba2946c-ac27-40e5-9103-3e816be754f3] vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.3/lib/active_support/tagged_logging.rb:26:in `tagged' 2017-08-11T01:43:05.559172+00:00 app[web.1]: [4ba2946c-ac27-40e5-9103-3e816be754f3] vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.3/lib/active_support/tagged_logging.rb:69:in `tagged' 2017-08-11T01:43:05.559172+00:00 app[web.1]: [4ba2946c-ac27-40e5-9103-3e816be754f3] vendor/bundle/ruby/2.3.0/gems/railties-5.1.3/lib/rails/rack/logger.rb:24:in `call' 2017-08-11T01:43:05.559173+00:00 app[web.1]: [4ba2946c-ac27-40e5-9103-3e816be754f3] vendor/bundle/ruby/2.3.0/gems/actionpack-5.1.3/lib/action_dispatch/middleware/request_id.rb:25:in `call' 2017-08-11T01:43:05.559173+00:00 app[web.1]: [4ba2946c-ac27-40e5-9103-3e816be754f3] vendor/bundle/ruby/2.3.0/gems/actionpack-5.1.3/lib/action_dispatch/middleware/remote_ip.rb:79:in `call' 2017-08-11T01:43:05.559174+00:00 app[web.1]: [4ba2946c-ac27-40e5-9103-3e816be754f3] vendor/bundle/ruby/2.3.0/gems/rack-2.0.3/lib/rack/method_override.rb:22:in `call' 2017-08-11T01:43:05.559174+00:00 app[web.1]: [4ba2946c-ac27-40e5-9103-3e816be754f3] vendor/bundle/ruby/2.3.0/gems/rack-2.0.3/lib/rack/runtime.rb:22:in `call' 2017-08-11T01:43:05.559176+00:00 app[web.1]: [4ba2946c-ac27-40e5-9103-3e816be754f3] vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.3/lib/active_support/cache/strategy/local_cache_middleware.rb:27:in `call' 2017-08-11T01:43:05.559177+00:00 app[web.1]: [4ba2946c-ac27-40e5-9103-3e816be754f3] vendor/bundle/ruby/2.3.0/gems/actionpack-5.1.3/lib/action_dispatch/middleware/executor.rb:12:in `call' 2017-08-11T01:43:05.559177+00:00 app[web.1]: [4ba2946c-ac27-40e5-9103-3e816be754f3] vendor/bundle/ruby/2.3.0/gems/actionpack-5.1.3/lib/action_dispatch/middleware/static.rb:125:in `call' 2017-08-11T01:43:05.559178+00:00 app[web.1]: [4ba2946c-ac27-40e5-9103-3e816be754f3] vendor/bundle/ruby/2.3.0/gems/rack-2.0.3/lib/rack/sendfile.rb:111:in `call' 2017-08-11T01:43:05.559178+00:00 app[web.1]: [4ba2946c-ac27-40e5-9103-3e816be754f3] vendor/bundle/ruby/2.3.0/gems/railties-5.1.3/lib/rails/engine.rb:522:in `call' 2017-08-11T01:43:05.559179+00:00 app[web.1]: [4ba2946c-ac27-40e5-9103-3e816be754f3] vendor/bundle/ruby/2.3.0/gems/puma-3.9.1/lib/puma/configuration.rb:224:in `call' 2017-08-11T01:43:05.559180+00:00 app[web.1]: [4ba2946c-ac27-40e5-9103-3e816be754f3] vendor/bundle/ruby/2.3.0/gems/puma-3.9.1/lib/puma/server.rb:602:in `handle_request' 2017-08-11T01:43:05.559181+00:00 app[web.1]: [4ba2946c-ac27-40e5-9103-3e816be754f3] vendor/bundle/ruby/2.3.0/gems/puma-3.9.1/lib/puma/server.rb:435:in `process_client' 2017-08-11T01:43:05.559181+00:00 app[web.1]: [4ba2946c-ac27-40e5-9103-3e816be754f3] vendor/bundle/ruby/2.3.0/gems/puma-3.9.1/lib/puma/server.rb:299:in `block in run' 2017-08-11T01:43:05.559182+00:00 app[web.1]: [4ba2946c-ac27-40e5-9103-3e816be754f3] vendor/bundle/ruby/2.3.0/gems/puma-3.9.1/lib/puma/thread_pool.rb:120:in `block in spawn_thread' 2017-08-11T01:43:05.559094+00:00 heroku[router]: at=info method=GET path="/" host=ancient-chamber-34720.herokuapp.com request_id=4ba2946c-ac27-40e5-9103-3e816be754f3 fwd="99.120.160.17" dyno=web.1 connect=0ms service=3ms status=404 bytes=1902 protocol=https 2017-08-11T01:47:57.042650+00:00 app[api]: Starting process with command `bundle exec rake db:setup` by user [email protected] 2017-08-11T01:48:01.990913+00:00 heroku[run.4123]: State changed from starting to up 2017-08-11T01:48:02.024309+00:00 heroku[run.4123]: Awaiting client 2017-08-11T01:48:02.052289+00:00 heroku[run.4123]: Starting process with command `bundle exec rake db:setup` 2017-08-11T01:48:10.217218+00:00 heroku[run.4123]: Process exited with status 1 2017-08-11T01:48:10.232633+00:00 heroku[run.4123]: State changed from up to complete 2017-08-11T02:02:42.679829+00:00 app[api]: Starting process with command `bundle exec rake db:migrate` by user [email protected] 2017-08-11T02:02:51.689696+00:00 heroku[run.1356]: Awaiting client 2017-08-11T02:02:51.739457+00:00 heroku[run.1356]: Starting process with command `bundle exec rake db:migrate` 2017-08-11T02:02:51.866557+00:00 heroku[run.1356]: State changed from starting to up 2017-08-11T02:02:59.292552+00:00 heroku[run.1356]: Process exited with status 0 2017-08-11T02:02:59.307200+00:00 heroku[run.1356]: State changed from up to complete 2017-08-11T02:05:52.716537+00:00 heroku[router]: at=info method=GET path="/" host=ancient-chamber-34720.herokuapp.com request_id=fd8e890f-9c20-4efb-8d70-a91ceab82aba fwd="99.120.160.17" dyno=web.1 connect=0ms service=2ms status=404 bytes=1902 protocol=https 2017-08-11T02:05:52.715968+00:00 app[web.1]: [fd8e890f-9c20-4efb-8d70-a91ceab82aba] Started GET "/" for 99.120.160.17 at 2017-08-11 02:05:52 +0000 2017-08-11T02:05:52.716458+00:00 app[web.1]: [fd8e890f-9c20-4efb-8d70-a91ceab82aba]
2017-08-11T02:05:52.716486+00:00 app[web.1]: [fd8e890f-9c20-4efb-8d70-a91ceab82aba] ActionController::RoutingError (No route matches [GET] "/"): 2017-08-11T02:05:52.716510+00:00 app[web.1]: [fd8e890f-9c20-4efb-8d70-a91ceab82aba]
2017-08-11T02:05:52.716553+00:00 app[web.1]: [fd8e890f-9c20-4efb-8d70-a91ceab82aba] vendor/bundle/ruby/2.3.0/gems/actionpack-5.1.3/lib/action_dispatch/middleware/debug_exceptions.rb:63:in `call' 2017-08-11T02:05:52.716554+00:00 app[web.1]: [fd8e890f-9c20-4efb-8d70-a91ceab82aba] vendor/bundle/ruby/2.3.0/gems/actionpack-5.1.3/lib/action_dispatch/middleware/show_exceptions.rb:31:in `call' 2017-08-11T02:05:52.716556+00:00 app[web.1]: [fd8e890f-9c20-4efb-8d70-a91ceab82aba] vendor/bundle/ruby/2.3.0/gems/railties-5.1.3/lib/rails/rack/logger.rb:36:in `call_app' 2017-08-11T02:05:52.716558+00:00 app[web.1]: [fd8e890f-9c20-4efb-8d70-a91ceab82aba] vendor/bundle/ruby/2.3.0/gems/railties-5.1.3/lib/rails/rack/logger.rb:24:in `block in call' 2017-08-11T02:05:52.716558+00:00 app[web.1]: [fd8e890f-9c20-4efb-8d70-a91ceab82aba] vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.3/lib/active_support/tagged_logging.rb:69:in `block in tagged' 2017-08-11T02:05:52.716559+00:00 app[web.1]: [fd8e890f-9c20-4efb-8d70-a91ceab82aba] vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.3/lib/active_support/tagged_logging.rb:26:in `tagged' 2017-08-11T02:05:52.716560+00:00 app[web.1]: [fd8e890f-9c20-4efb-8d70-a91ceab82aba] vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.3/lib/active_support/tagged_logging.rb:69:in `tagged' 2017-08-11T02:05:52.716561+00:00 app[web.1]: [fd8e890f-9c20-4efb-8d70-a91ceab82aba] vendor/bundle/ruby/2.3.0/gems/railties-5.1.3/lib/rails/rack/logger.rb:24:in `call' 2017-08-11T02:05:52.716561+00:00 app[web.1]: [fd8e890f-9c20-4efb-8d70-a91ceab82aba] vendor/bundle/ruby/2.3.0/gems/actionpack-5.1.3/lib/action_dispatch/middleware/remote_ip.rb:79:in `call' 2017-08-11T02:05:52.716563+00:00 app[web.1]: [fd8e890f-9c20-4efb-8d70-a91ceab82aba] vendor/bundle/ruby/2.3.0/gems/rack-2.0.3/lib/rack/method_override.rb:22:in `call' 2017-08-11T02:05:52.716562+00:00 app[web.1]: [fd8e890f-9c20-4efb-8d70-a91ceab82aba] vendor/bundle/ruby/2.3.0/gems/actionpack-5.1.3/lib/action_dispatch/middleware/request_id.rb:25:in `call' 2017-08-11T02:05:52.716564+00:00 app[web.1]: [fd8e890f-9c20-4efb-8d70-a91ceab82aba] vendor/bundle/ruby/2.3.0/gems/rack-2.0.3/lib/rack/runtime.rb:22:in `call' 2017-08-11T02:05:52.716565+00:00 app[web.1]: [fd8e890f-9c20-4efb-8d70-a91ceab82aba] vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.3/lib/active_support/cache/strategy/local_cache_middleware.rb:27:in `call' 2017-08-11T02:05:52.716566+00:00 app[web.1]: [fd8e890f-9c20-4efb-8d70-a91ceab82aba] vendor/bundle/ruby/2.3.0/gems/actionpack-5.1.3/lib/action_dispatch/middleware/executor.rb:12:in `call' 2017-08-11T02:05:52.716567+00:00 app[web.1]: [fd8e890f-9c20-4efb-8d70-a91ceab82aba] vendor/bundle/ruby/2.3.0/gems/actionpack-5.1.3/lib/action_dispatch/middleware/static.rb:125:in `call' 2017-08-11T02:05:52.716568+00:00 app[web.1]: [fd8e890f-9c20-4efb-8d70-a91ceab82aba] vendor/bundle/ruby/2.3.0/gems/railties-5.1.3/lib/rails/engine.rb:522:in `call' 2017-08-11T02:05:52.716567+00:00 app[web.1]: [fd8e890f-9c20-4efb-8d70-a91ceab82aba] vendor/bundle/ruby/2.3.0/gems/rack-2.0.3/lib/rack/sendfile.rb:111:in `call' 2017-08-11T02:05:52.716569+00:00 app[web.1]: [fd8e890f-9c20-4efb-8d70-a91ceab82aba] vendor/bundle/ruby/2.3.0/gems/puma-3.9.1/lib/puma/configuration.rb:224:in `call' 2017-08-11T02:05:52.716569+00:00 app[web.1]: [fd8e890f-9c20-4efb-8d70-a91ceab82aba] vendor/bundle/ruby/2.3.0/gems/puma-3.9.1/lib/puma/server.rb:602:in `handle_request' 2017-08-11T02:05:52.716570+00:00 app[web.1]: [fd8e890f-9c20-4efb-8d70-a91ceab82aba] vendor/bundle/ruby/2.3.0/gems/puma-3.9.1/lib/puma/server.rb:435:in `process_client' 2017-08-11T02:05:52.716571+00:00 app[web.1]: [fd8e890f-9c20-4efb-8d70-a91ceab82aba] vendor/bundle/ruby/2.3.0/gems/puma-3.9.1/lib/puma/server.rb:299:in `block in run' 2017-08-11T02:05:52.716572+00:00 app[web.1]: [fd8e890f-9c20-4efb-8d70-a91ceab82aba] vendor/bundle/ruby/2.3.0/gems/puma-3.9.1/lib/puma/thread_pool.rb:120:in `block in spawn_thread' 2017-08-11T02:10:18.256514+00:00 heroku[router]: at=info method=GET path="/" host=ancient-chamber-34720.herokuapp.com request_id=18159048-11cd-4f4c-9bfe-e2e258376b0c fwd="99.120.160.17" dyno=web.1 connect=0ms service=2ms status=404 bytes=1902 protocol=https 2017-08-11T02:10:18.255372+00:00 app[web.1]: [18159048-11cd-4f4c-9bfe-e2e258376b0c] Started GET "/" for 99.120.160.17 at 2017-08-11 02:10:18 +0000 2017-08-11T02:10:18.255948+00:00 app[web.1]: [18159048-11cd-4f4c-9bfe-e2e258376b0c]
2017-08-11T02:10:18.256009+00:00 app[web.1]: [18159048-11cd-4f4c-9bfe-e2e258376b0c] ActionController::RoutingError (No route matches [GET] "/"): 2017-08-11T02:10:18.256060+00:00 app[web.1]: [18159048-11cd-4f4c-9bfe-e2e258376b0c]
2017-08-11T02:10:18.256151+00:00 app[web.1]: [18159048-11cd-4f4c-9bfe-e2e258376b0c] vendor/bundle/ruby/2.3.0/gems/actionpack-5.1.3/lib/action_dispatch/middleware/debug_exceptions.rb:63:in `call' 2017-08-11T02:10:18.256153+00:00 app[web.1]: [18159048-11cd-4f4c-9bfe-e2e258376b0c] vendor/bundle/ruby/2.3.0/gems/actionpack-5.1.3/lib/action_dispatch/middleware/show_exceptions.rb:31:in `call' 2017-08-11T02:10:18.256155+00:00 app[web.1]: [18159048-11cd-4f4c-9bfe-e2e258376b0c] vendor/bundle/ruby/2.3.0/gems/railties-5.1.3/lib/rails/rack/logger.rb:36:in `call_app' 2017-08-11T02:10:18.256156+00:00 app[web.1]: [18159048-11cd-4f4c-9bfe-e2e258376b0c] vendor/bundle/ruby/2.3.0/gems/railties-5.1.3/lib/rails/rack/logger.rb:24:in `block in call' 2017-08-11T02:10:18.256157+00:00 app[web.1]: [18159048-11cd-4f4c-9bfe-e2e258376b0c] vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.3/lib/active_support/tagged_logging.rb:69:in `block in tagged' 2017-08-11T02:10:18.256158+00:00 app[web.1]: [18159048-11cd-4f4c-9bfe-e2e258376b0c] vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.3/lib/active_support/tagged_logging.rb:26:in `tagged' 2017-08-11T02:10:18.256159+00:00 app[web.1]: [18159048-11cd-4f4c-9bfe-e2e258376b0c] vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.3/lib/active_support/tagged_logging.rb:69:in `tagged' 2017-08-11T02:10:18.256159+00:00 app[web.1]: [18159048-11cd-4f4c-9bfe-e2e258376b0c] vendor/bundle/ruby/2.3.0/gems/railties-5.1.3/lib/rails/rack/logger.rb:24:in `call' 2017-08-11T02:10:18.256161+00:00 app[web.1]: [18159048-11cd-4f4c-9bfe-e2e258376b0c] vendor/bundle/ruby/2.3.0/gems/actionpack-5.1.3/lib/action_dispatch/middleware/request_id.rb:25:in `call' 2017-08-11T02:10:18.256161+00:00 app[web.1]: [18159048-11cd-4f4c-9bfe-e2e258376b0c] vendor/bundle/ruby/2.3.0/gems/rack-2.0.3/lib/rack/method_override.rb:22:in `call' 2017-08-11T02:10:18.256160+00:00 app[web.1]: [18159048-11cd-4f4c-9bfe-e2e258376b0c] vendor/bundle/ruby/2.3.0/gems/actionpack-5.1.3/lib/action_dispatch/middleware/remote_ip.rb:79:in `call' 2017-08-11T02:10:18.256162+00:00 app[web.1]: [18159048-11cd-4f4c-9bfe-e2e258376b0c] vendor/bundle/ruby/2.3.0/gems/rack-2.0.3/lib/rack/runtime.rb:22:in `call' 2017-08-11T02:10:18.256163+00:00 app[web.1]: [18159048-11cd-4f4c-9bfe-e2e258376b0c] vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.3/lib/active_support/cache/strategy/local_cache_middleware.rb:27:in `call' 2017-08-11T02:10:18.256164+00:00 app[web.1]: [18159048-11cd-4f4c-9bfe-e2e258376b0c] vendor/bundle/ruby/2.3.0/gems/actionpack-5.1.3/lib/action_dispatch/middleware/executor.rb:12:in `call' 2017-08-11T02:10:18.256165+00:00 app[web.1]: [18159048-11cd-4f4c-9bfe-e2e258376b0c] vendor/bundle/ruby/2.3.0/gems/actionpack-5.1.3/lib/action_dispatch/middleware/static.rb:125:in `call' 2017-08-11T02:10:18.256165+00:00 app[web.1]: [18159048-11cd-4f4c-9bfe-e2e258376b0c] vendor/bundle/ruby/2.3.0/gems/rack-2.0.3/lib/rack/sendfile.rb:111:in `call' 2017-08-11T02:10:18.256166+00:00 app[web.1]: [18159048-11cd-4f4c-9bfe-e2e258376b0c] vendor/bundle/ruby/2.3.0/gems/railties-5.1.3/lib/rails/engine.rb:522:in `call' 2017-08-11T02:10:18.256166+00:00 app[web.1]: [18159048-11cd-4f4c-9bfe-e2e258376b0c] vendor/bundle/ruby/2.3.0/gems/puma-3.9.1/lib/puma/configuration.rb:224:in `call' 2017-08-11T02:10:18.256167+00:00 app[web.1]: [18159048-11cd-4f4c-9bfe-e2e258376b0c] vendor/bundle/ruby/2.3.0/gems/puma-3.9.1/lib/puma/server.rb:602:in `handle_request' 2017-08-11T02:10:18.256168+00:00 app[web.1]: [18159048-11cd-4f4c-9bfe-e2e258376b0c] vendor/bundle/ruby/2.3.0/gems/puma-3.9.1/lib/puma/server.rb:435:in `process_client' 2017-08-11T02:10:18.256169+00:00 app[web.1]: [18159048-11cd-4f4c-9bfe-e2e258376b0c] vendor/bundle/ruby/2.3.0/gems/puma-3.9.1/lib/puma/server.rb:299:in `block in run' 2017-08-11T02:10:18.256169+00:00 app[web.1]: [18159048-11cd-4f4c-9bfe-e2e258376b0c] vendor/bundle/ruby/2.3.0/gems/puma-3.9.1/lib/puma/thread_pool.rb:120:in `block in spawn_thread' 2017-08-11T02:44:02.843309+00:00 heroku[web.1]: Idling 2017-08-11T02:44:02.844174+00:00 heroku[web.1]: State changed from up to down 2017-08-11T02:44:03.498485+00:00 heroku[web.1]: Stopping all processes with SIGTERM 2017-08-11T02:44:03.512042+00:00 app[web.1]: - Gracefully stopping, waiting for requests to finish 2017-08-11T02:44:03.512960+00:00 app[web.1]: Exiting 2017-08-11T02:44:03.512921+00:00 app[web.1]: - Goodbye! 2017-08-11T02:44:03.512915+00:00 app[web.1]: === puma shutdown: 2017-08-11 02:44:03 +0000 === 2017-08-11T02:44:03.635679+00:00 heroku[web.1]: Process exited with status 0

有什麼建議?

+0

你確定rails應用程序在你推向heroku的repo的根目錄? –

+0

你好..請在cloud9命令行中輸入'heroku logs'運行'heroku logs' –

回答

0

我認爲你需要編譯你的資產, 你可以在你

config/environments/production.rb文件做到這一點:

請把這個

config.assets.compile = true

這將是,如果你非常有幫助從heroku發佈日誌。

+0

根據[this answer](https://stackoverflow.com/questions/8821864/config-assets-compile-true-in- rails-production-why-not),通過將'config.assets.compile'設置爲true,頁面加載時間將受到負面影響。 – Brandon

相關問題