【问题标题】:error "NameError: uninitialized constant Spree::ThemeSupport" while using spree_import_products gem使用 spree_import_products gem 时出现错误“NameError:未初始化的常量 Spree::ThemeSupport”
【发布时间】:2015-12-09 09:18:07
【问题描述】:

在我的应用程序中,我正在使用 spree gem。现在对于产品导入,我使用了 spree_import_products gem。

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

然后在gem文件中捆绑安装”。然后运行捆绑安装,它成功安装。然后运行“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'

如何解决这个问题...

【问题讨论】:

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


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-10-16
      • 1970-01-01
      相关资源
      最近更新 更多