【问题标题】:Getting started with Spree Installation Trouble开始使用 Spree 安装问题
【发布时间】:2011-08-20 06:32:12
【问题描述】:

所以...

看起来有两种方法可以开始使用 Spree,只要将它实现到你的 Rails 应用程序中,这两种方法都不起作用......

方法A

$ spree mystore

结果

spree: command not found

方法B

$ rails cart
$ cd cart
$ rails g spree:site

结果

我吐出了“rails”命令的手册页,好像它不知道我在说什么。

Usage:
  rails new APP_PATH [options]

Options:
  -J, [--skip-prototype]      # Skip Prototype files
  -T, [--skip-test-unit]      # Skip Test::Unit files
      [--dev]                 # Setup the application with Gemfile pointing to your            Rails checkout
  -G, [--skip-git]            # Skip Git ignores and keeps
  -m, [--template=TEMPLATE]   # Path to an application template (can be a filesystem      path or URL)
  -b, [--builder=BUILDER]     # Path to an application builder (can be a filesystem path or URL)

等等……


这是我所做的:

$ sudo gem install spree #and all of its dependencies

我的宝石文件:

source :rubygems
# Generic gem dependencies first
gem 'mysql2'
gem 'newrelic_rpm'

# Followed by spree itself first, all spree-specific extensions second
gem 'spree'
gem 'spree_active_shipping', :git => 'https://github.com/spree/spree_active_shipping.git'
gem 'spree_product_assembly', :git => 'git://github.com/spree/spree-product-assembly.git'
gem 'spree_static_content', :git => 'git://github.com/spree/spree_static_content.git'
# EOF

然后跑了

$ bundle install

那么我错过了什么,我的优秀 S.O.社区?

【问题讨论】:

    标签: ruby-on-rails content-management-system gem shopping-cart spree


    【解决方案1】:

    正如他们在Github 中所描述的那样,您必须创建一个新的 rails 应用程序并将 gem 'spree' 添加到 gemfile,然后进行捆绑安装。

    【讨论】:

    • 我的 gem 文件中有 gem 'spree',我在运行 $ rails g spree:site 之前创建了一个新的 Rails 应用程序。我会更新我的帖子以明确
    • 是的,这就是我在“方法 b”中所遵循的
    • 你能在你的宝石清单上看到狂欢吗?
    • 是的:\这越来越难过了,不是吗?
    【解决方案2】:

    想通了。

    • 必须是 Rails 3。我昨天变成了一个大男孩并升级了。
    • 在此之后遇到了一大堆问题,因此请确保在 gemfile 和您的 gem 列表中的 spree gemversion 匹配(我的是 0.50.2)默认情况下不会发生这种情况。
    • 这个

      gem 'spree_static_content', :git => 'git://github.com/spree/spree-static-content.git'
      

    必须变成

    gem 'spree_static_content', :git => 'git://github.com/spree/spree_static_content.git'
    

    在您的 gemfile 中,文档是错误的。

    • 您必须编辑 /home/user/.bundler/ruby/1.8/spree_active_shipping-cb4f80aeb9c9/lib/tasks/active_shipping_extension_tasks.rake 中的第 6 行以反映“RAILS_ROOT”而不是“something_shippy_thingy.root”

    • 你必须跑

      rails g spree_product_assembly:install
      rails g spree_static_content:install
      rake db:migrate
      

    所以,是的,大量的挖掘,其中大部分不在文档中。希望其他人发现它及其有用

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-01-06
      相关资源
      最近更新 更多