0

我正在尝试按照他们的指南安装 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。

谢谢您的帮助。

4

2 回答 2

1

I would recommend uninstalling the version of Ruby that was installed using apt-get, and instead install it with this guide.

于 2012-12-14T09:33:01.060 回答
1

正如@RyanBigg 建议的那样,这是rails 的版本问题。解决方案是卸载 APT 的 rails 版本并通过 gem 安装它,同时专注于设置spree 安装指南中提到的确切版本

sudo aptitude remove
gem install rails -v 3.2.3

与您可能认为 APT 版本“太新”(3.2.9)相反。

于 2012-12-14T15:10:25.450 回答