当我启动服务器并导航到我的应用程序根页面时,我遇到了一个奇怪的小错误。
Started GET "/" for ::1 at 2017-04-27 03:01:32 -0600
Processing by AicoController#home as HTML
Rendering aico/home.html.erb within layouts/application
Rendered aico/home.html.erb within layouts/application (187.7ms)
Rendered application/_favicon.html.erb (7.5ms)
Rendered nav/_signed_out.html.erb (2.5ms)
Rendered footer/_footer.html.erb (1.7ms)
Completed 200 OK in 304ms (Views: 294.2ms | ActiveRecord: 0.0ms)
Started GET "/..." for ::1 at 2017-04-27 03:01:32 -0600
ActionController::RoutingError (No route matches [GET] "/..."):
它呈现页面并且不会弹出更好的错误错误,但在生产中,它根本不会让页面加载。
我之前从未遇到过这种情况,我将把我的路线文件放在下面,并将完整的堆栈跟踪。这里的任何帮助将不胜感激,因为我不知道我在看什么(并重新启动服务器没有解决问题)
此错误发生的唯一时间是我导航到我的根页面。
我的路线文件:
Rails.application.routes.draw do
root 'aico#home'
get 'aico/fire'
get 'aico/water'
get 'aico/mold'
get 'aico/asbestos'
get 'aico/biohazard'
get 'aico/elemental'
get 'aico/general_contracting'
get 'aico/roofing_exterior'
get 'aico/about'
get 'aico/grow_op'
get 'contact-me', to: 'messages#new', as: 'new_message'
post 'contact-me', to: 'messages#create', as: 'create_message'
end
Rake Routes输出:
root GET / aico#home
aico_fire GET /aico/fire(.:format) aico#fire
aico_water GET /aico/water(.:format) aico#water
aico_mold GET /aico/mold(.:format) aico#mold
aico_asbestos GET /aico/asbestos(.:format) aico#asbestos
aico_biohazard GET /aico/biohazard(.:format) aico#biohazard
aico_elemental GET /aico/elemental(.:format) aico#elemental
aico_general_contracting GET /aico/general_contracting(.:format) aico#general_contracting
aico_roofing_exterior GET /aico/roofing_exterior(.:format) aico#roofing_exterior
aico_about GET /aico/about(.:format) aico#about
aico_grow_op GET /aico/grow_op(.:format) aico#grow_op
new_message GET /contact-me(.:format) messages#new
create_message POST /contact-me(.:format) messages#create
完整堆栈跟踪:
Started GET "/" for ::1 at 2017-04-27 03:01:32 -0600
Processing by AicoController#home as HTML
Rendering aico/home.html.erb within layouts/application
Rendered aico/home.html.erb within layouts/application (187.7ms)
Rendered application/_favicon.html.erb (7.5ms)
Rendered nav/_signed_out.html.erb (2.5ms)
Rendered footer/_footer.html.erb (1.7ms)
Completed 200 OK in 304ms (Views: 294.2ms | ActiveRecord: 0.0ms)
Started GET "/..." for ::1 at 2017-04-27 03:01:32 -0600
ActionController::RoutingError (No route matches [GET] "/..."):
actionpack (5.0.2) lib/action_dispatch/middleware/debug_exceptions.rb:53:in `call'
web-console (3.5.0) lib/web_console/middleware.rb:135:in `call_app'
web-console (3.5.0) lib/web_console/middleware.rb:28:in `block in call'
web-console (3.5.0) lib/web_console/middleware.rb:18:in `catch'
web-console (3.5.0) lib/web_console/middleware.rb:18:in `call'
actionpack (5.0.2) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
railties (5.0.2) lib/rails/rack/logger.rb:36:in `call_app'
railties (5.0.2) lib/rails/rack/logger.rb:24:in `block in call'
activesupport (5.0.2) lib/active_support/tagged_logging.rb:69:in `block in tagged'
activesupport (5.0.2) lib/active_support/tagged_logging.rb:26:in `tagged'
activesupport (5.0.2) lib/active_support/tagged_logging.rb:69:in `tagged'
railties (5.0.2) lib/rails/rack/logger.rb:24:in `call'
sprockets-rails (3.2.0) lib/sprockets/rails/quiet_assets.rb:13:in `call'
actionpack (5.0.2) lib/action_dispatch/middleware/request_id.rb:24:in `call'
rack (2.0.1) lib/rack/method_override.rb:22:in `call'
rack (2.0.1) lib/rack/runtime.rb:22:in `call'
activesupport (5.0.2) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
actionpack (5.0.2) lib/action_dispatch/middleware/executor.rb:12:in `call'
actionpack (5.0.2) lib/action_dispatch/middleware/static.rb:136:in `call'
rack (2.0.1) lib/rack/sendfile.rb:111:in `call'
railties (5.0.2) lib/rails/engine.rb:522:in `call'
puma (3.8.2) lib/puma/configuration.rb:224:in `call'
puma (3.8.2) lib/puma/server.rb:600:in `handle_request'
puma (3.8.2) lib/puma/server.rb:435:in `process_client'
puma (3.8.2) lib/puma/server.rb:299:in `block in run'
puma (3.8.2) lib/puma/thread_pool.rb:120:in `block in spawn_thread'
Rendering /Users/taurenltd/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout
Rendering /Users/taurenltd/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb
Rendered /Users/taurenltd/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.0ms)
Rendered collection of /Users/taurenltd/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/routes/_route.html.erb [13 times] (4.5ms)
Rendered /Users/taurenltd/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/routes/_table.html.erb (7.3ms)
Rendering /Users/taurenltd/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb
Rendered /Users/taurenltd/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.2ms)
Rendered /Users/taurenltd/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout (95.4ms)
如果我需要任何进一步的信息,请告诉我,我可以忽略一些小的东西,这里的任何帮助将不胜感激!
干杯。