首页 文章
  • 0 votes
     answers
     views

    修改源代码后收到CanCan :: AccessDenied错误

    我是StackOverFlow的新人 . 很高兴见到你 . 现在,我正在使用Spree Framework制作EC Rails应用程序 . 狂欢管理员角色用户都很好 . 但是,在TextEditor中修改源代码后,自定义角色用户重定向到authentication_failure . 进程发生错误如下: 创建自定义用户角色'sub_admin' . 创建用户有'sub_admin'角色; ...
  • 3 votes
     answers
     views

    Capistrano使用Spree商务部署到Ubuntu服务器

    我成功部署了,但在我做完之后 . 我无法访问“状态”和“用户”的配置部分 . 我不确定应该从哪里开始解决这些问题 . 我在我的本地机器上使用Spree 1.2,Ruby 1.9.3,Rails 3.2.8 . 它工作得很好 . 我正在使用成功运行的spree部署过程 . 关于我应该从哪里开始的任何指示? 我得到的错误:“我们很抱歉,但出了点问题 . ”有没有办法在 生产环境 服务器上启用更有意义的...
  • 1 votes
     answers
     views

    无法使用Phusion Passenger将Spree部署到Apache

    我有一个Ubuntu 10.04服务器运行Apache与phusion乘客,我've been using to host rails apps. I' m无法正常部署到服务器狂欢 . 捆绑包正确安装,我可以从 rails s mongrel 运行应用程序就好了 . 但是当我从apache / passenger访问该站点时,我收到此错误 . Ruby (Rack) application cou...
  • 1 votes
     answers
     views

    使用Spree和jQuery-Select2为分组和平面列表项设置样式

    Preamble: 这个问题在Spree和jQuery-select2库的上下文中,但是对于那些不熟悉这些库的人来说它应该是可以回答的,因为它主要与CSS样式有关 . General problem statement: 我有一个包含两个选择框的页面,正在使用jQuery-select2创建和处理 . 第一个是简单的平面列表 . 然而,第二个是分组列表 . Spree应用的交替颜色样式在第二个列...
  • 0 votes
     answers
     views

    狂欢商务:变体缩略图

    我有一些产品有一些变种(基于不同的颜色): 如何为产品的每种变体(颜色)更改左拇指/图像?当我想选择“绿色”颜色时,例如,我想要显示绿色包,当我选择“红色”红色包等等 谢谢!
  • 3 votes
     answers
     views

    Spree自定义/扩展用户角色和权限

    我试图在Spree中指定一些自定义角色,例如角色'client',并扩展权限以访问此角色的admin部分 . 该用户只能访问该用户创建的产品 . 概念是让具有角色“客户”的用户仅管理产品和其他特定模型 . 首先,我添加了CanCan插件,并在role_ability.rb中定义了RoleAbility类 就这篇文章:Spree Custom Roles Permissions class Role...
  • 1 votes
     answers
     views

    使用设计将Spree添加到rails应用程序

    我是RoR的新人,但我很喜欢它的每一点:) 我有一个小应用程序,使用设计进行身份验证,它工作正常 . 现在我想添加一个电子商务部分,我决定狂欢 . 我安装了spree,在安装过程中它询问我是否要使用默认身份验证,我说'不' . 然后它问我用户模型,我说'用户' . 现在我输入我的应用程序,我登录它进入疯狂的产品页面 . 没关系,但是当我尝试访问管理部分时,我被重定向到产品页面 . 我的怀疑是: -...
  • 0 votes
     answers
     views

    添加路由到Ruby on Rails Spree Commerce应用程序?

    我安装了以下相关宝石: gem 'spree', github: 'spree/spree', branch: '2-1-stable' gem 'spree_auth_devise', :git => 'https://github.com/spree/spree_auth_devise.git', :branch => '2-1-stable' 使用spree_auth_dev...
  • 1 votes
     answers
     views

    狂欢 - 我能够在管理面板中看到我的标签,但授权失败的消息闪烁

    我正在为Spree创建扩展 . 它允许多个商店,所以我在管理区域添加了一个面板 . 我还创建了一个新角色:store我创建了一个AbilityDecorator,如下所示 module Spree class AbilityDecorator include CanCan::Ability def initialize(user) if user.respond...
  • 0 votes
     answers
     views

    使用rails自定义用户角色的狂欢商务

    我正在尝试添加salesRep的用户角色,他可以通过从下拉列表中选择用户(与管理员相同)代表用户从管理员端订购产品 . 我在rails 5中使用狂欢商务 . 我在app / models / spree / ability_decorator.rb上有ability_decorator class AbilityDecorator include CanCan::Ability ...
  • 1 votes
     answers
     views

    Bundler找不到gem“spree_core”的兼容版本

    我正在尝试安装spree_braintree gem以将braintree网关与spree 3.0.1集成 . 当我运行“bundle install”时,我收到此错误“Bundler无法找到gem的兼容版本”spree_core“” . 这是我的Gemfile . source 'https://rubygems.org' # Bundle edge Rails instead: gem...
  • 0 votes
     answers
     views

    狂欢安装NoMethodError

    我正在尝试将狂欢商店安装到我的 rails 应用程序中,当我在终端中输入 spree install 时,收到以下错误: home/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/specification.rb:2158:in method_missing': undefined method this' for #<Gem::Specific...
  • -2 votes
     answers
     views

    Rails服务器(Spreecommerce - Thin)无法启动

    我在 Cloud 端9 IDE中启动我的rails应用程序时遇到了麻烦 . 我知道我必须在启动服务器时声明端口和Ip(rails server -b $ IP -p $ PORT),同时尝试声明一个特定的端口号 . 我用kill -9 XXXX结束了一些进程 . 在此之后我按照此论坛的建议删除了server.pid . 没有结果 . 这是我一直收到的错误 . 谁能帮我看看错误信息 . 我认为错误是...
  • 0 votes
     answers
     views

    Bundler找不到gem“rails”的兼容版本:for spree

    我正在尝试将rails 4.0.4的安装与spree 2.2.2版本捆绑在一起,我面临以下问题: Bundler找不到gem“rails”的兼容版本:在Gemfile中:spree(= 2.2.2)ruby依赖于spree_core(= 2.2.2)ruby依赖于rails(〜> 4.0.5)ruby rails (4.0.4) 在我的Gemfile中: 宝石'狂欢','2.2.2' 宝石...
  • 0 votes
     answers
     views

    如何计算无 - 在Rails上无

    Rails 4,Spree 2.1 The Issue: 使用Spree Flexi Variants雕刻计算器将项目添加到购物车时,出现错误: undefined method `value' for nil:NilClass 我的雕刻计算器模型中的这条线是否会导致此错误? def compute(product_customization, variant=nil) return 0 u...
  • 3 votes
     answers
     views

    Spree Commerce安装错误,Bundler找不到gem“rails”的兼容版本

    当我安装Spree网站时(根据本指南:http://guides.spreecommerce.com/getting_started.html),我遇到了这个问题: deploy @ bothunter:〜/ rails $ sudo -i gem install rails成功安装rails-3.2.1 1 gem安装部署@ bothunter:〜/ rails $ sudo -i gem i...
  • 0 votes
     answers
     views

    将Spree部署到Heroku

    为了将spree部署到heroku,当我输入"git push heroku master"时,我按照https://github.com/krozen20/Spree-version-0.11.0/blob/master/spree.txt中的guidline显示了这条消息 从http://rubygems.org安装gem chronic 0.2.3错误:安装chroni...
  • 1 votes
     answers
     views

    Ruby elasticsearch-model - 配置多个映射

    module Spree Product.class_eval do include Elasticsearch::Model index_name Spree::ElasticsearchSettings.index document_type 'spree_product' mapping _all: {"index_analyzer" =&g...

热门问题