我正在使用 Spree 1.3.0,我已经安装了 spree_products_tags 用于向产品添加标签,
srikanth@srikanth-laptop:~/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 的代码,
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
一个。如何摆脱Spree::ThemeSupport
并执行上述操作?
湾。是否有任何其他替代方法可以为狂欢添加标签?