您要查找的页面不存在。您可能输错了地址或页面可能已移动

时间:2016-01-06 18:51:31

标签: railstutorial.org

我正在尝试在Heroku中运行我的应用程序,但我不断收到此错误消息;

您要查找的页面不存在。您可能输错了地址或页面可能已移动。

我已经查看了其他问题,但似乎没有解决我的问题。

这是我的Gemfile:

source 'https://rubygems.org'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 4.2.2'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0.2'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '~> 2.5.3'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.1.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby

# Use jquery as the JavaScript library
gem 'jquery-rails', '~> 4.0.3'
# Turbolinks makes following links in your web application faster. Read  more: https://github.com/rails/turbolinks
gem 'turbolinks', '~> 2.3.0'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.2.3'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc

# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

# Use Unicorn as the app server
# gem 'unicorn'

# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development

group :development, :test do
  # Use sqlite3 as the database for Active Record
  gem 'sqlite3', '~> 1.3.9'
  # Call 'byebug' anywhere in the code to stop execution and get a debugger console
  gem 'byebug', '~> 3.4.0'

  # Access an IRB console on exception pages or by using <%= console %> in views
  gem 'web-console', '~> 2.0.0.beta3'

  # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
  gem 'spring', '1.1.3'
end

group :test do
  gem 'minitest-reporters', '1.0.5'
  gem 'mini_backtrace',     '0.1.3'
  gem 'guard-minitest',     '2.3.1'
end
group :production do
  gem 'pg',             '0.17.1'
   gem 'rails_12factor', '0.0.2'
end

这是我的Heroku日志:

2016-01-06T18:24:47.735637+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/etag.rb:24:in `call'
2016-01-06T18:24:47.735638+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/conditionalget.rb:25:in `call'
2016-01-06T18:24:47.735638+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/head.rb:13:in `call'
2016-01-06T18:24:47.735639+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.2/lib/action_dispatch/middleware/params_parser.rb:27:in `call'
2016-01-06T18:24:47.735640+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.2/lib/action_dispatch/middleware/flash.rb:260:in `call'
2016-01-06T18:24:47.735640+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/session/abstract/id.rb:225:in `context'
2016-01-06T18:24:47.735641+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/session/abstract/id.rb:220:in `call'
2016-01-06T18:24:47.735642+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.2/lib/action_dispatch/middleware/cookies.rb:560:in `call'
2016-01-06T18:24:47.735643+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.2/lib/active_record/query_cache.rb:36:in `call'
2016-01-06T18:24:47.735644+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:649:in `call'
2016-01-06T18:24:47.735644+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.2/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
2016-01-06T18:24:47.735645+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.2/lib/active_support/callbacks.rb:88:in `call'
2016-01-06T18:24:47.735646+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.2/lib/active_support/callbacks.rb:88:in `_run_callbacks'
2016-01-06T18:24:47.735646+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.2/lib/active_support/callbacks.rb:776:in `_run_call_callbacks'
2016-01-06T18:24:47.735647+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.2/lib/active_support/callbacks.rb:81:in `run_callbacks'
2016-01-06T18:24:47.735648+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.2/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
2016-01-06T18:24:47.735649+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.2/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
2016-01-06T18:24:47.735649+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.2/lib/action_dispatch/middleware/remote_ip.rb:78:in `call'
2016-01-06T18:24:47.735650+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.2/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
2016-01-06T18:24:47.735651+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/railties-4.2.2/lib/rails/rack/logger.rb:20:in `block in call'
2016-01-06T18:24:47.735651+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/railties-4.2.2/lib/rails/rack/logger.rb:38:in `call_app'
2016-01-06T18:24:47.735652+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.2/lib/active_support/tagged_logging.rb:68:in `block in tagged'
2016-01-06T18:24:47.735653+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.2/lib/act ve_support/tagged_logging.rb:26:in `tagged'
2016-01-06T18:24:47.735653+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.2/lib/active_support/tagged_logging.rb:68:in `tagged'
2016-01-06T18:24:47.735654+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/railties-4.2.2/lib/rails/rack/logger.rb:20:in `call'
2016-01-06T18:24:47.735655+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.2/lib/action_dispatch/middleware/request_id.rb:21:in `call'
2016-01-06T18:24:47.735655+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/methodoverride.rb:22:in `call'
2016-01-06T18:24:47.735662+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/runtime.rb:18:in `call'
2016-01-06T18:24:47.735663+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.2/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
2016-01-06T18:24:47.735664+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.2/lib/action_dispatch/middleware/static.rb:113:in `call'
2016-01-06T18:24:47.735664+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/sendfile.rb:113:in `call'
2016-01-06T18:24:47.735665+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/railties-4.2.2/lib/rails/engine.rb:518:in `call'
2016-01-06T18:24:47.735666+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/railties-4.2.2/lib/rails/application.rb:164:in `call'
2016-01-06T18:24:47.735666+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/lock.rb:17:in `call'
2016-01-06T18:24:47.735667+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/content_length.rb:15:in `call'
2016-01-06T18:24:47.735668+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/handler/webrick.rb:88:in `service'
2016-01-06T18:24:47.735669+00:00 app[web.1]:   vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `service'
2016-01-06T18:24:47.735670+00:00 app[web.1]:   vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run'
2016-01-06T18:24:47.735671+00:00 app[web.1]:   vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread'
2016-01-06T18:24:47.735671+00:00 app[web.1]: 
2016-01-06T18:24:47.735672+00:00 app[web.1]: 
2016-01-06T18:24:47.737552+00:00 heroku[router]: at=info method=GET path="/" host=obscure-sea-2176.herokuapp.com request_id=0403cf7d-fd8e-46f5-a84c-5c44344601e7 fwd="98.188.200.50" dyno=web.1 connect=1ms service=78ms status=404 bytes=1829
2016-01-06T18:24:47.966150+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=obscure-sea-2176.herokuapp.com request_id=c6a19b7d-ffdc-4a8d-b982-27b225c19055 fwd="98.188.200.50" dyno=web.1 connect=2ms service=6ms status=200 bytes=228
2016-01-06T18:32:16.106647+00:00 heroku[router]: at=info method=GET path="/" host=obscure-sea-2176.herokuapp.com request_id=d1694c05-f0ab-421f-afae-8188e4739cd9 fwd="98.188.200.50" dyno=web.1 connect=0ms service=17ms status=404 bytes=1829
2016-01-06T18:32:16.091328+00:00 app[web.1]: Started GET "/" for 98.188.200.50 at 2016-01-06 18:32:16 +0000
2016-01-06T18:32:16.097940+00:00 app[web.1]: 
2016-01-06T18:32:16.097945+00:00 app[web.1]: AbstractController::ActionNotFound (The action 'sample' could not be found for ApplicationController):
2016-01-06T18:32:16.097946+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.2/lib/abstract_controller/base.rb:132:in `process'
2016-01-06T18:32:16.097947+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionview-4.2.2/lib/action_view/rendering.rb:30:in `process'
2016-01-06T18:32:16.097948+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.2/lib/action_controller/metal.rb:196:in `dispatch'
2016-01-06T18:32:16.097949+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.2/lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
2016-01-06T18:32:16.097950+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.2/lib/action_controller/metal.rb:237:in `block in action'
2016-01-06T18:32:16.097951+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.2/lib/action_dispatch/routing/route_set.rb:74:in `call'
2016-01-06T18:32:16.097951+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.2/lib/action_dispatch/routing/route_set.rb:74:in `dispatch'
2016-01-06T18:32:16.097952+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.2/lib/action_dispatch/routing/route_set.rb:43:in `serve'
2016-01-06T18:32:16.097953+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.2/lib/action_dispatch/journey/router.rb:43:in `block in serve'
2016-01-06T18:32:16.097954+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.2/lib/action_dispatch/journey/router.rb:30:in `each'
2016-01-06T18:32:16.097955+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.2/lib/action_dispatch/journey/router.rb:30:in `serve'
2016-01-06T18:32:16.097955+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.2/lib/action_dispatch/routing/route_set.rb:819:in `call'
2016-01-06T18:32:16.097956+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/etag.rb:24:in `call'
2016-01-06T18:32:16.097957+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/conditionalget.rb:25:in `call'
2016-01-06T18:32:16.097959+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.2/lib/action_dispatch/middleware/flash.rb:260:in `call'
2016-01-06T18:32:16.097958+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/head.rb:13:in `call'
2016-01-06T18:32:16.097959+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.2/lib/action_dispatch/middleware/params_parser.rb:27:in `call'
2016-01-06T18:32:16.097962+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.2/lib/action_dispatch/middleware/cookies.rb:560:in `call'
2016-01-06T18:32:16.097969+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.2/lib/active_record/query_cache.rb:36:in `call'
2016-01-06T18:32:16.097971+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:649:in `call'
2016-01-06T18:32:16.097973+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.2/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
2016-01-06T18:32:16.097973+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.2/lib/active_support/callbacks.rb:88:in `call'
2016-01-06T18:32:16.097974+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.2/lib/active_support/callbacks.rb:88:in `_run_callbacks'
2016-01-06T18:32:16.097961+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/session/abstract/id.rb:220:in `call'
2016-01-06T18:32:16.097960+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/session/abstract/id.rb:225:in `context'
2016-01-06T18:32:16.097976+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.2/lib/active_support/callbacks.rb:81:in `run_callbacks'
2016-01-06T18:32:16.097978+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.2/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
2016-01-06T18:32:16.097979+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.2/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
2016-01-06T18:32:16.097975+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.2/lib/active_support/callbacks.rb:776:in `_run_call_callbacks'
2016-01-06T18:32:16.097977+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.2/lib/action_dispatch/middleware/remote_ip.rb:78:in `call'
2016-01-06T18:32:16.097976+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.2/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
2016-01-06T18:32:16.097980+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/railties-4.2.2/lib/rails/rack/logger.rb:38:in `call_app'
2016-01-06T18:32:16.097980+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/railties-4.2.2/lib/rails/rack/logger.rb:20:in `block in call'
2016-01-06T18:32:16.097981+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.2/lib/active_support/tagged_logging.rb:68:in `block in tagged'
2016-01-06T18:32:16.097982+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.2/lib/active_support/tagged_logging.rb:68:in `tagged'
2016-01-06T18:32:16.097982+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.2/lib/active_support/tagged_logging.rb:26:in `tagged'
2016-01-06T18:32:16.097983+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/railties-4.2.2/lib/rails/rack/logger.rb:20:in `call'
2016-01-06T18:32:16.097984+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.2/lib/action_dispatch/middleware/request_id.rb:21:in `call'
2016-01-06T18:32:16.097985+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/methodoverride.rb:22:in `call'
2016-01-06T18:32:16.097990+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/runtime.rb:18:in `call'
2016-01-06T18:32:16.097991+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.2/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
2016-01-06T18:32:16.097992+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/actionpack-4.2.2/lib/action_dispatch/middleware/static.rb:113:in `call'
2016-01-06T18:32:16.097992+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/sendfile.rb:113:in `call'
2016-01-06T18:32:16.097993+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/railties-4.2.2/lib/rails/engine.rb:518:in `call'
2016-01-06T18:32:16.097994+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/railties-4.2.2/lib/rails/application.rb:164:in `call'
2016-01-06T18:32:16.097995+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/lock.rb:17:in `call'
2016-01-06T18:32:16.097995+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/content_length.rb:15:in `call'
2016-01-06T18:32:16.097996+00:00 app[web.1]:   vendor/bundle/ruby/2.0.0/gems/rack-1.6.4/lib/rack/handler/webrick.rb:88:in `service'
2016-01-06T18:32:16.097997+00:00 app[web.1]:   vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `service'
2016-01-06T18:32:16.097997+00:00 app[web.1]:   vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run'
2016-01-06T18:32:16.097998+00:00 app[web.1]:   vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread'
2016-01-06T18:32:16.097999+00:00 app[web.1]: 
2016-01-06T18:32:16.097999+00:00 app[web.1]: 
2016-01-06T18:32:16.340732+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=obscure-sea-2176.herokuapp.com request_id=488e55e0-adb8-4349-bd8b-b2f268a12148 fwd="98.188.200.50" dyno=web.1 connect=2ms service=7ms status=304 bytes=133

1 个答案:

答案 0 :(得分:0)

  

2016-01-06T18:32:16.097945 + 00:00 app [web.1]:   AbstractController :: ActionNotFound(动作&#39;样本&#39;不可能   找到ApplicationController):

  • 在看到日志时,似乎已经错过了sample方法 ApplicatioController

希望这能帮到你!!!

如果没有工作,请分享您的控制器代码。