2012-12-27 2 views
1

, 나는초기화되지 않은 상수 난사는 ThemeSupport :: - 슈 프레 내가 슈 프레 1.3.0를 사용하고 1.3

[email protected]:~/projects/mystore$ rake spree_products_tags:install:migrations 
rake aborted! 
uninitialized constant Spree::ThemeSupport 
/home/srikanth/.rvm/gems/ruby-1.9.3-p327/bundler/gems/spree_products_tags-b90636c337ff/lib/spree_products_tags_hooks.rb:1:in `<top (required)>' 
/home/srikanth/.rvm/gems/ruby-1.9.3-p327/gems/polyglot-0.3.3/lib/polyglot.rb:63:in `require' 
/home/srikanth/.rvm/gems/ruby-1.9.3-p327/gems/polyglot-0.3.3/lib/polyglot.rb:63:in `require' 
/home/srikanth/.rvm/gems/ruby-1.9.3-p327/bundler/gems/spree_products_tags-b90636c337ff/lib/spree_products_tags.rb:2:in `<top (required)>' 
/home/srikanth/.rvm/gems/ruby-1.9.3-p327/gems/bundler-1.2.3/lib/bundler/runtime.rb:68:in `require' 
/home/srikanth/.rvm/gems/ruby-1.9.3-p327/gems/bundler-1.2.3/lib/bundler/runtime.rb:68:in `block (2 levels) in require' 
/home/srikanth/.rvm/gems/ruby-1.9.3-p327/gems/bundler-1.2.3/lib/bundler/runtime.rb:66:in `each' 
/home/srikanth/.rvm/gems/ruby-1.9.3-p327/gems/bundler-1.2.3/lib/bundler/runtime.rb:66:in `block in require' 
/home/srikanth/.rvm/gems/ruby-1.9.3-p327/gems/bundler-1.2.3/lib/bundler/runtime.rb:55:in `each' 
/home/srikanth/.rvm/gems/ruby-1.9.3-p327/gems/bundler-1.2.3/lib/bundler/runtime.rb:55:in `require' 
/home/srikanth/.rvm/gems/ruby-1.9.3-p327/gems/bundler-1.2.3/lib/bundler.rb:128:in `require' 
/home/srikanth/projects/mystore/config/application.rb:7:in `<top (required)>' 
/home/srikanth/projects/mystore/Rakefile:5:in `require' 
/home/srikanth/projects/mystore/Rakefile:5:in `<top (required)>' 
/home/srikanth/.rvm/gems/ruby-1.9.3-p327/bin/ruby_noexec_wrapper:14:in `eval' 
/home/srikanth/.rvm/gems/ruby-1.9.3-p327/bin/ruby_noexec_wrapper:14:in `<main>' 
(See full trace by running task with --trace) 

내가 spree_products_tags의 코드를 확인하신 후, 제품에 태그를 추가 spree_products_tags를 설치 한

class SpreeProductsTagsHooks < Spree::ThemeSupport::HookListener 
    insert_after :admin_configurations_menu do 
    "<%= configurations_menu_item(I18n.t('product_tags'), admin_product_tags_path, I18n.t('product_tags_desc')) %>" 
    end 

    insert_after :admin_configurations_sidebar_menu do 
    %(<li<%== ' class="active"' if controller.controller_name == 'product_tags' %>><%= link_to t('product_tags'), admin_product_tags_path %></li>) 
    end 

    insert_after :admin_product_form_right, "admin/products/tag_fields" 

    insert_after :products_list_item, "products/tag" 
end 

a. Spree::ThemeSupport &도 제거하는 방법은 위의 실행합니까?
b. spree에 태그를 추가하는 다른 대안이 있습니까?

답변

2

a. 문제는 그들이 사실 ThemeSupport (1.1 또는 1.2에서 생각)를 제거했기 때문에 Deface을 사용해야한다는 것입니다. 문제는 사용하고있는 보석이 업그레이드되지 않았으므로 그 것을 교체해야합니다. SpreeProductsTagsHooks 및 훼손

편집을 사용하여, 여기에 하나 나는 우리는 1.1에서 제거있어이 https://github.com/romul/spree_user_groups/blob/ec2a169d96acf6cbcf731d24d518134e55598d29/app/overrides/add_user_groups_to_configuration_menu.rb

+2

에 좋은 곳입니다 하단에 주석 이전 ThemeSupport를 왼쪽 어떤 이유로, 얼마 전에 변경되었습니다. –

관련 문제