错误" NameError:未初始化的常量Spree :: ThemeSupport"同时使用spree_import_products gem

时间:2015-12-09 09:18:08

标签: ruby-on-rails ruby-on-rails-4 rubygems spree

在我的应用中,我使用的是spree gem。现在进行产品导入,我使用了spree_import_products gem。

first i add "gem 'import_products', :git => 'git://github.com/joshmcarthur/spree-import-products.git'

然后捆绑安装"在gem file.then运行bundle install,它已成功安装。然后运行" rake import_products:install"。但它显示错误,就像这样....

rake aborted!
NameError: uninitialized constant Spree::ThemeSupport
/home/ec2-user/.rvm/gems/ruby-2.2.1/bundler/gems/spree-import-products-2bcca17f140f/lib/import_products_hooks.rb:1:in `<top (required)>'
/home/ec2-user/.rvm/gems/ruby-2.2.1/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
/home/ec2-user/.rvm/gems/ruby-2.2.1/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
/home/ec2-user/.rvm/gems/ruby-2.2.1/bundler/gems/spree-import-products-2bcca17f140f/lib/import_products.rb:2:in `<top (required)>'
/home/ec2-user/.rvm/gems/ruby-2.2.1/gems/bundler-1.10.6/lib/bundler/runtime.rb:76:in `require'
/home/ec2-user/.rvm/gems/ruby-2.2.1/gems/bundler-1.10.6/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
/home/ec2-user/.rvm/gems/ruby-2.2.1/gems/bundler-1.10.6/lib/bundler/runtime.rb:72:in `each'
/home/ec2-user/.rvm/gems/ruby-2.2.1/gems/bundler-1.10.6/lib/bundler/runtime.rb:72:in `block in require'
/home/ec2-user/.rvm/gems/ruby-2.2.1/gems/bundler-1.10.6/lib/bundler/runtime.rb:61:in `each'
/home/ec2-user/.rvm/gems/ruby-2.2.1/gems/bundler-1.10.6/lib/bundler/runtime.rb:61:in `require'
/home/ec2-user/.rvm/gems/ruby-2.2.1/gems/bundler-1.10.6/lib/bundler.rb:134:in `require'

如何解决这个问题......

1 个答案:

答案 0 :(得分:0)

您可以检查here此扩展程序是否需要非常旧版本的Spree和Ruby。它没有测试。问题是扩展本身。寻找另一个扩展或实现自己。