2013-04-04 10 views
18

Nagle mojej aplikacji wydaje się rozwinęły błąd routingu uninitialized constant DashboardControllerAktywny Admin Ruby na szynach Panel Controller Error

Używam Rails 3.2.0 z ActiveAdmin (0.6.0) i aż do dzisiaj wszystko wydawało się działa dobrze.

Dziennik donosi następujący błąd, który występujące podczas próby uruchomienia localhost: 3000:

Started GET "/" for 127.0.0.1 at 2013-04-04 18:59:21 +0100 

ActionController::RoutingError (uninitialized constant DashboardController): 
    activesupport (3.2.0) lib/active_support/inflector/methods.rb:226:in `block in constantize' 
    activesupport (3.2.0) lib/active_support/inflector/methods.rb:225:in `each' 
    activesupport (3.2.0) lib/active_support/inflector/methods.rb:225:in `constantize' 
    actionpack (3.2.0) lib/action_dispatch/routing/route_set.rb:62:in `controller_reference' 
    actionpack (3.2.0) lib/action_dispatch/routing/route_set.rb:47:in `controller' 
    actionpack (3.2.0) lib/action_dispatch/routing/route_set.rb:26:in `call' 
    journey (1.0.4) lib/journey/router.rb:68:in `block in call' 
    journey (1.0.4) lib/journey/router.rb:56:in `each' 
    journey (1.0.4) lib/journey/router.rb:56:in `call' 
    actionpack (3.2.0) lib/action_dispatch/routing/route_set.rb:570:in `call' 
    warden (1.2.1) lib/warden/manager.rb:35:in `block in call' 
    warden (1.2.1) lib/warden/manager.rb:34:in `catch' 
    warden (1.2.1) lib/warden/manager.rb:34:in `call' 
    actionpack (3.2.0) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call' 
    rack (1.4.5) lib/rack/etag.rb:23:in `call' 
    rack (1.4.5) lib/rack/conditionalget.rb:25:in `call' 
    actionpack (3.2.0) lib/action_dispatch/middleware/head.rb:14:in `call' 
    actionpack (3.2.0) lib/action_dispatch/middleware/params_parser.rb:21:in `call' 
    actionpack (3.2.0) lib/action_dispatch/middleware/flash.rb:242:in `call' 
    rack (1.4.5) lib/rack/session/abstract/id.rb:210:in `context' 
    rack (1.4.5) lib/rack/session/abstract/id.rb:205:in `call' 
    actionpack (3.2.0) lib/action_dispatch/middleware/cookies.rb:338:in `call' 
    activerecord (3.2.0) lib/active_record/query_cache.rb:64:in `call' 
    activerecord (3.2.0) lib/active_record/connection_adapters/abstract/connection_pool.rb:443:in `call' 
    actionpack (3.2.0) lib/action_dispatch/middleware/callbacks.rb:28:in `block in call' 
    activesupport (3.2.0) lib/active_support/callbacks.rb:405:in `_run__972453933__call__19086187__callbacks' 
    activesupport (3.2.0) lib/active_support/callbacks.rb:405:in `__run_callback' 
    activesupport (3.2.0) lib/active_support/callbacks.rb:385:in `_run_call_callbacks' 
    activesupport (3.2.0) lib/active_support/callbacks.rb:81:in `run_callbacks' 
    actionpack (3.2.0) lib/action_dispatch/middleware/callbacks.rb:27:in `call' 
    actionpack (3.2.0) lib/action_dispatch/middleware/reloader.rb:65:in `call' 
    actionpack (3.2.0) lib/action_dispatch/middleware/remote_ip.rb:31:in `call' 
    actionpack (3.2.0) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call' 
    actionpack (3.2.0) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call' 
    railties (3.2.0) lib/rails/rack/logger.rb:26:in `call_app' 
    railties (3.2.0) lib/rails/rack/logger.rb:16:in `call' 
    actionpack (3.2.0) lib/action_dispatch/middleware/request_id.rb:22:in `call' 
    rack (1.4.5) lib/rack/methodoverride.rb:21:in `call' 
    rack (1.4.5) lib/rack/runtime.rb:17:in `call' 
    activesupport (3.2.0) lib/active_support/cache/strategy/local_cache.rb:72:in `call' 
    rack (1.4.5) lib/rack/lock.rb:15:in `call' 
    actionpack (3.2.0) lib/action_dispatch/middleware/static.rb:53:in `call' 
    railties (3.2.0) lib/rails/engine.rb:479:in `call' 
    railties (3.2.0) lib/rails/application.rb:220:in `call' 
    rack (1.4.5) lib/rack/content_length.rb:14:in `call' 
    railties (3.2.0) lib/rails/rack/log_tailer.rb:14:in `call' 
    thin (1.5.1) lib/thin/connection.rb:81:in `block in pre_process' 
    thin (1.5.1) lib/thin/connection.rb:79:in `catch' 
    thin (1.5.1) lib/thin/connection.rb:79:in `pre_process' 
    thin (1.5.1) lib/thin/connection.rb:54:in `process' 
    thin (1.5.1) lib/thin/connection.rb:39:in `receive_data' 
    eventmachine-1.0.3-x86 (mingw32) lib/eventmachine.rb:187:in `run_machine' 
    eventmachine-1.0.3-x86 (mingw32) lib/eventmachine.rb:187:in `run' 
    thin (1.5.1) lib/thin/backends/base.rb:63:in `start' 
    thin (1.5.1) lib/thin/server.rb:159:in `start' 
    rack (1.4.5) lib/rack/handler/thin.rb:13:in `run' 
    rack (1.4.5) lib/rack/server.rb:268:in `start' 
    railties (3.2.0) lib/rails/commands/server.rb:70:in `start' 
    railties (3.2.0) lib/rails/commands.rb:55:in `block in <top (required)>' 
    railties (3.2.0) lib/rails/commands.rb:50:in `tap' 
    railties (3.2.0) lib/rails/commands.rb:50:in `<top (required)>' 
    script/rails:6:in `require' 
    script/rails:6:in `<main>' 


    Rendered C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/actionpack-3.2.0/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (234.0ms) 

Czy ktoś miał ten błąd? Każda pomoc, jaką mogą zaoferować ludzie, byłaby bardzo cenna!

Odpowiedz

74

Przesuń administratora: Aby => yourController Wskaźnik powyżej ActiveAdmin.routes (samo)

Po uruchomieniu bundle exec rake routes widać yourController Wskaźnik powyżej indeksu dashboard #.

Ten problem występuje, ponieważ ma 2 trasy do korzenia (1 W i 1 z aktywnym admin)

+1

Ten pracował dla mnie! – Jonas

+0

+1 działało również w moim przypadku :) –

+0

Dziękuję za to! Zrobiłem kilka innych zmian oprócz aktualizacji ActiveAdmin, a co gorsza, zdarzyło nam się, że mamy innego kontrolera w naszej aplikacji o nazwie DashboardController .. więc całkowicie pomyślałem, że to coś, co stworzyłem. –