gpt4 book ai didi

ruby-on-rails - Spree 未初始化常量 Spree::UserSessionsController

转载 作者:行者123 更新时间:2023-12-04 16:06:51 26 4
gpt4 key购买 nike

我遇到 Spree 问题,当我尝试转到/admin 页面时,我得到 Spree 未初始化常量 Spree::UserSessionsController。我被重定向到/login 并且出现错误。

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'

我正在使用 spree 2.2。 gem 文件是

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"

我使用的所有路由和 Controller 都是标准的,所以不确定是什么导致了这个错误。任何帮助将不胜感激。

最佳答案

您是否尝试在您的 Gemfile 中切换 spree 和 spree_auth_devise 设计的顺序?

关于ruby-on-rails - Spree 未初始化常量 Spree::UserSessionsController,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24885793/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com