我想使用核心、后端和api宝石来设置狂欢节。我已经安装了Spree 2-2稳定,成功地运行迁移、种子和设置管理用户,而rake路由返回API和后端gems提供的疯狂路由。我原以为管理登录将由后端gem提供,但是后端中的控制器目前都不能被应用程序访问(API控制器工作得很好)。
Spree安装:安装了'spree','2.2.2',然后修改了gemfile,使其只包含核心、后端、api。不包括样本数据。我本来可以从默认的狂潮创业板开始工作,但也会出现错误。
Spree.user_class = "Spree::User"
Gemfile:
gem 'rails', '4.0.5'
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_core', '~> 2.2.2'
gem 'spree_backend', '~> 2.2.2'
gem 'spree_api', '~> 2.2.2'http://localhost:3000/admin/login => uninitialized constant Spree::Admin::UserSessionsController
http://localhost:3000/login => uninitialized constant Spree::UserSessionsController
我已经为这个问题寻找了解决方案,但是我发现的结果是处理Spree扩展,或者处理更老版本的spree/rails。
谢谢!
发布于 2014-05-25 20:07:37
在宝石文件中,狂潮宝石需要出现在'spree_auth_devise‘之前。该应用程序现在正在使用完整的狂潮宝石,我相信我也可以使用定制的狂欢节宝石向前迈进。
另外,在这个文件中设置了用于狂欢节的用户控制器和路由:devise/blob/master/config/routes.rb
控制器也在spree_auth_devise gem中定义。
https://stackoverflow.com/questions/23850604
复制相似问题