2010-04-29 5 views
0

authlogic에서 실행되는 기존 레일 앱에 Hobo를 관리 하위 사이트로 통합하는 방법을 알고있는 사람이 있습니까?RAiles Authlogic and Hobo

나는이 tutorial을 따라 왔지만 작동하지 않습니다.

도움말 또는 자습서 링크를 참조하십시오!

균열 좋아한다 누구를위한 어떤 erorr 코드 : 응용 프로그램에

~/dev/copy> ./script/server 
=> Booting Mongrel 
=> Rails 2.3.4 application starting on http://0.0.0.0:3000 
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:426:in `load_missing_constant': Expected /Users/Mister/dev/copy/app/controllers/admin/admin_controller.rb to define Admin::AdminController (LoadError) 
    from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:80:in `const_missing' 
    from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/inflector.rb:361:in `constantize' 
    from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/inflector.rb:360:in `each' 
    from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/inflector.rb:360:in `constantize' 
    from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/core_ext/string/inflections.rb:162:in `constantize' 
    from /opt/local/lib/ruby/gems/1.8/gems/hobo-1.0.0/lib/hobo/model_controller.rb:61:in `all_controllers' 
    from /opt/local/lib/ruby/gems/1.8/gems/hobo-1.0.0/lib/hobo/model_controller.rb:57:in `each' 
    from /opt/local/lib/ruby/gems/1.8/gems/hobo-1.0.0/lib/hobo/model_controller.rb:57:in `all_controllers' 
    from /opt/local/lib/ruby/gems/1.8/gems/hobo-1.0.0/lib/hobo/model_router.rb:97:in `add_routes_for' 
    from /opt/local/lib/ruby/gems/1.8/gems/hobo-1.0.0/lib/hobo/model_router.rb:83:in `add_routes' 
    from /opt/local/lib/ruby/gems/1.8/gems/hobo-1.0.0/lib/hobo/model_router.rb:83:in `each' 
    from /opt/local/lib/ruby/gems/1.8/gems/hobo-1.0.0/lib/hobo/model_router.rb:83:in `add_routes' 
    from /opt/local/lib/ruby/gems/1.8/gems/hobo-1.0.0/rails/../lib/hobo.rb:73:in `add_routes' 
    from /Users/Mister/dev/copy/config/routes.rb:6 
    from /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/routing/route_set.rb:226:in `draw' 
    from /Users/Mister/dev/copy/config/routes.rb:1 
    from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:145:in `load_without_new_constant_marking' 
    from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:145:in `load' 
    from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:521:in `new_constants_in' 
    from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:145:in `load' 
    from /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/routing/route_set.rb:286:in `load_routes!' 
    from /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/routing/route_set.rb:286:in `each' 
    from /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/routing/route_set.rb:286:in `load_routes!' 
    from /opt/local/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/routing/route_set.rb:266:in `reload!' 
    from /Users/Mister/.gem/ruby/1.8/gems/rails-2.3.4/lib/initializer.rb:537:in `initialize_routing' 
    from /Users/Mister/.gem/ruby/1.8/gems/rails-2.3.4/lib/initializer.rb:188:in `process' 
    from /Users/Mister/.gem/ruby/1.8/gems/rails-2.3.4/lib/initializer.rb:113:in `send' 
    from /Users/Mister/.gem/ruby/1.8/gems/rails-2.3.4/lib/initializer.rb:113:in `run' 
    from /Users/Mister/dev/copy/config/environment.rb:11 
    from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' 
    from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' 
    from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:156:in `require' 
    from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:521:in `new_constants_in' 
    from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:156:in `require' 
    from /Users/Mister/.gem/ruby/1.8/gems/rails-2.3.4/lib/commands/server.rb:84 
    from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' 
    from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' 
    from ./script/server:3 

환경과 보석 :

RAILS_GEM_VERSION = '2.3.4' unless defined? RAILS_GEM_VERSION 

ENV['RAILS_ENV'] ||= 'development' 
config.gem 'hobo' 
config.gem "RedCloth", :version => ">= 4.2.2" 
config.gem "authlogic" 
    config.gem "cancan" 
    config.gem "jrails" 
    config.gem "peteonrails-vote_fu", :source => "http://gems.github.com", :lib => "vote_fu" 

경로 :

map.site_search 'search', :controller => 'admin/front', :action => 'search' 
    map.admin '/admin', :controller => 'admin/front', :action => 'index' 

    Hobo.add_routes(map) 
+0

당신이 해결 한 것 같습니다. 해결책으로 스스로에게 대답 해 주시겠습니까? 그런 다음 이것을 닫은 것으로 표시하십시오. :) – JezC

답변

0

추측 ...

class AdminController < ApplicationController 
    ... 
end 

그리고 당신이 필요합니다 : admin/admin_controller.rb 당신은

class Admin::AdminController < ApplicationController 
    ... 
end 

네임 스페이스 지정을 커버.

+0

위의 Tony가 이미 완료되었습니다. 앱을 위반하는 will_paginate 였지만 Dan은 환호했습니다. – MrThomas