狂欢前端帮助器不可用,导致"未定义的局部变量或方法`body_class'"

时间:2015-08-25 02:06:23

标签: ruby-on-rails spree

我试图在现有应用程序上安装Spree。它安装成功,但在导航到任何Spree页面时,我在"undefined local variable or method 'body_class'"第10行收到spree_frontend-3.0.4/app/views/spree/layouts/spree_application.html.erb错误。

body_classspree_frontend-3.0.4/app/helpers/spree/frontend_helper.rb中的方法,因此该文件中的辅助方法似乎不可用。但为什么不呢?

我尝试设置一个全新的Rails应用程序并在其上安装Spree,并且它有效。因此,我现有的应用程序存在一些与Spree有关的奇怪内容,但我无法想到它可能是什么。

这是我的Gemfile,如果有帮助的话:

    source 'https://rubygems.org'

    ruby '2.2.0'
    gem 'rails', '4.2.3'
    gem 'sass-rails', "~> 4.0.2"
    gem 'celluloid', '~> 0.16.0'
    gem 'unicorn'
    gem 'bootstrap-sass', '~> 3.3.5'
    gem 'bcrypt-ruby', '3.1.2'
    #gem 'faker', '1.1.2'
    gem 'kaminari'
    gem 'kaminari-bootstrap', '~> 3.0.1'
    gem 'pg'
    gem 'devise', '>= 3.5.1'
    gem "devise-async"
    gem 'dependent-fields-rails'
    gem 'underscore-rails'
    gem "marco-polo"
    gem 'aws-sdk', '~> 1.63'
    gem 'aws-sdk-resources', '~> 2'
    gem 'paperclip', "~> 4.1"
    gem 'delayed_job_active_record'
    gem 'delayed_job_web'
    # gem 'hirefire', :github => 'michaelkeenan/hirefire'
    gem 's3_direct_upload', :github => 'maxgillett/s3_direct_upload'
    # gem 's3_multipart', :github => 'maxgillett/s3_multipart'
    #gem "s3_multipart", :path => "../s3_multipart"
    gem "s3_multipart", :github => 'michaelkeenan/s3_multipart', :tag => 'v0.0.11.9'
    #gem 'rest_in_place', :git => "git://github.com/michaelkeenan/rest_in_place.git"
    gem 'best_in_place', '~> 3.0.1'
    gem 'pundit'
    gem 'data-confirm-modal', github: 'ifad/data-confirm-modal'
    gem 'money-rails'
    gem 'font-awesome-sass'
    # gem 'jquery-turbolinks'
    gem 'rubyzip', '~> 1.1.6', require: 'zip'
    gem 'obfuscate_id', '~> 0.0.5', :git => "git://github.com/michaelkeenan/obfuscate_id.git"
    gem 'redcarpet'
    gem 'pagedown-bootstrap-rails'
    gem 'honeybadger'
    gem "paranoia"
    gem 'paranoia_uniqueness_validator', '1.1.0'
    gem 'unscoped_associations'
    gem 'friendly_id', '~> 5.1.0'
    gem 'nokogiri'
    gem "hirefire-resource"
    gem 'acts_as_list'
    gem 'mailboxer', '~> 0.13.0'
    gem 'zeroclipboard-rails'
    gem 'bootstrap-datepicker-rails'
    gem "awesome_print", require:"ap"
    gem 'cloudfront-signer'
    gem 'rack-attack'

    group :development do
        gem 'better_errors'
        gem 'binding_of_caller', :platforms=>[:mri_19, :mri_20, :rbx]
        gem 'rails_layout'
        gem 'bullet'
        gem 'did_you_mean', '~> 0.9.5'
        gem 'quiet_assets'
        gem 'meta_request'
        gem 'pry-rails'
    end

    group :development, :test do
        gem 'spring', '~> 1.3.6'
        gem "spring-commands-rspec"
        gem 'minitest'
        gem 'rspec-rails', '~> 3.2'
        gem 'guard-rspec'
        gem 'rb-fsevent', :require => false
        #gem 'guard-zeus'
        gem 'growl', '1.0.3'
        gem 'childprocess', '0.5.0'
        gem 'email_spec'
        gem 'pry-byebug'
        gem 'pry-stack_explorer'
        gem 'pry-remote'
    end

    group :test do
        gem 'selenium-webdriver', '2.41.0'
        gem 'capybara'
        gem 'capybara-webkit'
        gem 'factory_girl_rails', '4.2.1', :require => false
        gem 'database_cleaner'
    end

    #group :assets do
        gem 'sprockets-rails', :require => 'sprockets/railtie'
        gem 'coffee-rails', '~> 4.0.0'
        gem 'uglifier', '>= 1.3.0'
        gem "fog", "~>1.28"
        gem 'asset_sync'
    #end

    gem 'jquery-rails', '4.0.4'
    gem 'jquery-ui-rails', '5.0.5'
    gem 'remotipart', '~> 1.2'
    # gem 'turbolinks'
    gem 'jbuilder', '~> 1.2'

    group :doc do
        gem 'sdoc', '0.3.20', require: false
    end

    group :production do
        gem 'rails_12factor', '0.0.2'
        gem 'lograge'
    end
    gem 'spree', '3.0.4'

0 个答案:

没有答案