因此...
看起来有两种方法可以开始使用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
我的Gemfile:
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.社区?
答案 0 :(得分:1)
正如他们在Github上所描述的那样,你必须创建一个新的rails应用程序并将gem'spree'添加到gemfile中,然后进行bundle install。
答案 1 :(得分:0)
弄明白了。
此
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”< / p>
你必须运行
rails g spree_product_assembly:install
rails g spree_static_content:install
rake db:migrate
所以是的,很多挖掘,而且大部分都不在文档中。希望其他人找到这个及其有用的