Spree安装uninitialized常量ActiveSupport :: CoreExtensions

时间:2012-12-11 17:34:55

标签: spree

我正在尝试按照他们的指南安装Spree:http://guides.spreecommerce.com/getting_started.html

我遇到了一个奇怪的问题:

    /usr/lib/ruby/vendor_ruby/active_support/inflector.rb:407: uninitialized constant ActiveSupport::CoreExtensions (NameError)
    from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
    from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `require'
    from /usr/lib/ruby/vendor_ruby/active_support/core_ext/string/inflections.rb:1
    from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
    from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `require'
    from /usr/lib/ruby/vendor_ruby/active_support/core_ext/string.rb:3
    from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
    from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `require'
    from /var/lib/gems/1.8/gems/spree_cmd-1.2.2/lib/spree_cmd/installer.rb:2
    from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
    from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `require'
    from /var/lib/gems/1.8/gems/spree_cmd-1.2.2/lib/spree_cmd.rb:13
    from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:55:in `gem_original_require'
    from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:55:in `require'
    from /var/lib/gems/1.8/gems/spree_cmd-1.2.2/bin/spree:2
    from /usr/local/bin/spree:19:

我正在使用Ubuntu Server 12.04和Rails 3.2.9。

感谢您的帮助。

2 个答案:

答案 0 :(得分:1)

我建议卸载使用apt-get安装的Ruby版本,而不是使用this guide安装它。

答案 1 :(得分:1)

正如@RyanBigg所说,这是rails的版本问题。解决方案是卸载导轨版本的APT并通过gem安装它,同时专注于设置the spree installation guide中提到的确切版本

sudo aptitude remove
gem install rails -v 3.2.3

反对你可能认为APT版本“太近了”(3.2.9)。