我正在尝试在 Rails 应用中打开页面/page
,但我在日志文件上收到以下错误:
ActionController::RoutingError (No route matches [GET] "/page"):
.bundle/ruby/2.3.0/gems/actionpack-4.0.13/lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
.bundle/ruby/2.3.0/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in `call'
.bundle/ruby/2.3.0/gems/actionpack-4.0.13/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
.bundle/ruby/2.3.0/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in `call'
.bundle/ruby/2.3.0/gems/railties-4.0.13/lib/rails/rack/logger.rb:38:in `call_app'
.bundle/ruby/2.3.0/gems/railties-4.0.13/lib/rails/rack/logger.rb:20:in `block in call'
.bundle/ruby/2.3.0/gems/activesupport-4.0.13/lib/active_support/tagged_logging.rb:68:in `block in tagged'
.bundle/ruby/2.3.0/gems/activesupport-4.0.13/lib/active_support/tagged_logging.rb:26:in `tagged'
.bundle/ruby/2.3.0/gems/activesupport-4.0.13/lib/active_support/tagged_logging.rb:68:in `tagged'
.bundle/ruby/2.3.0/gems/railties-4.0.13/lib/rails/rack/logger.rb:20:in `call'
.bundle/ruby/2.3.0/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in `call'
.bundle/ruby/2.3.0/gems/actionpack-4.0.13/lib/action_dispatch/middleware/request_id.rb:21:in `call'
.bundle/ruby/2.3.0/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in `call'
.bundle/ruby/2.3.0/gems/request_store-1.0.6/lib/request_store/middleware.rb:8:in `call'
.bundle/ruby/2.3.0/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in `call'
.bundle/ruby/2.3.0/gems/rack-1.5.5/lib/rack/methodoverride.rb:21:in `call'
.bundle/ruby/2.3.0/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in `call'
.bundle/ruby/2.3.0/gems/rack-1.5.5/lib/rack/runtime.rb:17:in `call'
.bundle/ruby/2.3.0/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in `call'
.bundle/ruby/2.3.0/gems/activesupport-4.0.13/lib/active_support/cache/strategy/local_cache.rb:83:in `call'
.bundle/ruby/2.3.0/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in `call'
.bundle/ruby/2.3.0/gems/rack-1.5.5/lib/rack/sendfile.rb:112:in `call'
.bundle/ruby/2.3.0/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in `call'
.bundle/ruby/2.3.0/gems/rack-cors-0.4.0/lib/rack/cors.rb:80:in `call'
.bundle/ruby/2.3.0/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in `call'
.bundle/ruby/2.3.0/gems/airbrake-4.3.4/lib/airbrake/user_informer.rb:16:in `_call'
.bundle/ruby/2.3.0/gems/airbrake-4.3.4/lib/airbrake/user_informer.rb:12:in `call'
.bundle/ruby/2.3.0/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in `call'
.bundle/ruby/2.3.0/gems/railties-4.0.13/lib/rails/engine.rb:511:in `call'
.bundle/ruby/2.3.0/gems/railties-4.0.13/lib/rails/application.rb:97:in `call'
.bundle/ruby/2.3.0/gems/railties-4.0.13/lib/rails/railtie/configurable.rb:30:in `method_missing'
.bundle/ruby/2.3.0/gems/newrelic_rpm-4.2.0.334/lib/new_relic/agent/instrumentation/middleware_tracing.rb:92:in `call'
/usr/local/Cellar/passenger/5.1.5/libexec/src/ruby_supportlib/phusion_passenger/rack/thread_handler_extension.rb:97:in `process_request'
/usr/local/Cellar/passenger/5.1.5/libexec/src/ruby_supportlib/phusion_passenger/request_handler/thread_handler.rb:152:in `accept_and_process_next_request'
/usr/local/Cellar/passenger/5.1.5/libexec/src/ruby_supportlib/phusion_passenger/request_handler/thread_handler.rb:113:in `main_loop'
/usr/local/Cellar/passenger/5.1.5/libexec/src/ruby_supportlib/phusion_passenger/request_handler.rb:416:in `block (3 levels) in start_threads'
/usr/local/Cellar/passenger/5.1.5/libexec/src/ruby_supportlib/phusion_passenger/utils.rb:113:in `block in create_thread_and_abort_on_exception'
我在bundle exec rake routes
中查了一下,似乎有一条路线匹配[GET] "/page"
:
root GET /page(.:format) page#index
有谁知道如何解决这个问题?
答案 0 :(得分:0)
我的子域名错了。它适用于正确的子域:)