2014-07-22 3 views
1

Spree에 대한 문제가 발생했습니다./admin 페이지로 이동하려고 시도 할 때 Spree 초기화되지 않은 상수 인 Spree :: UserSessionsController가 발생합니다. /login으로 리디렉션되어 오류가 발생합니다.Spree 초기화되지 않은 상수 Spree :: UserSessionsController

Started GET "/admin" for 127.0.0.1 at 2014-07-22 20:26:22 +1000 
Processing by Spree::Admin::OrdersController#index as HTML 
    Spree::Preference Load (2.4ms) SELECT "spree_preferences".* FROM "spree_preferences" WHERE "spree_preferences"."key" = 'spree/backend_configuration/locale' LIMIT 1 
Redirected to http://localhost:3000/login 
Completed 302 Found in 499ms (ActiveRecord: 14.4ms) 


Started GET "/login" for 127.0.0.1 at 2014-07-22 20:26:22 +1000 

ActionController::RoutingError - uninitialized constant Spree::UserSessionsController: 
    actionpack (4.0.3) lib/action_dispatch/routing/route_set.rb:69:in `rescue in controller' 
    actionpack (4.0.3) lib/action_dispatch/routing/route_set.rb:64:in `controller' 

저는 2.2를 사용하고 있습니다. Gemfile은

gem 'rails', '4.0.3' 
gem 'pg' 
gem 'sass-rails', '~> 4.0.2' 
gem 'uglifier', '>= 1.3.0' 
gem 'coffee-rails', '~> 4.0.0' 
gem 'jquery-rails' 
gem 'turbolinks' 
gem 'jbuilder', '~> 1.2' 
gem 'unicorn' 
gem 'spree_gateway', :git => 'https://github.com/spree/spree_gateway.git', :branch => '2-2-stable' 
gem 'spree_auth_devise', :git => 'https://github.com/spree/spree_auth_devise.git', :branch => '2-2-stable' 
gem 'spree', '2.2.0' 
gem 'spree_bootstrap_frontend', github: '200Creative/spree_bootstrap_frontend', branch: '2-2-stable' 
gem 'spree_blogging_spree', github: 'stefansenk/spree-blogging-spree', :branch => '2-2-stable' 
gem 'spree_editor', github: 'spree/spree_editor', :branch => '2-2-stable' 
gem 'spree_print_invoice' , :git => 'git://github.com/spree/spree_print_invoice.git', :branch => '2-2-stable' 

이니셜 라이저 폴더에서 spree.rb를 이중 선택했습니다. 표준이 있습니다 Spree.user_class = "Spree::User"

제가 사용하고있는 모든 경로와 컨트롤러는 재고 표준이므로이 오류의 원인이 무엇인지 확실하지 않습니다. 어떤 도움이라도 대단히 감사하겠습니다.

답변

4

gemfile에서 spree와 spree_auth_devise devins의 순서를 바꾸려고 했습니까?

1

안녕하세요, 다음과 같이 Gemfile에있는 spree gem의 순서를 변경하십시오.

다른 마구 보석의

추가 마구 보석 상단

gem 'spree', '2.2.0' 
gem 'spree_gateway', :git => 'https://github.com/spree/spree_gateway.git', :branch => '2-2-stable' 
gem 'spree_auth_devise', :git => 'https://github.com/spree/spree_auth_devise.git', :branch => '2-2-stable' 
gem 'spree_bootstrap_frontend', github: '200Creative/spree_bootstrap_frontend', branch: '2-2-stable' 
gem 'spree_blogging_spree', github: 'stefansenk/spree-blogging-spree', :branch => '2-2-stable' 
gem 'spree_editor', github: 'spree/spree_editor', :branch => '2-2-stable' 
gem 'spree_print_invoice' , :git => 'git://github.com/spree/spree_print_invoice.git', :branch => '2-2-stable' 
관련 문제