我正在尝试使用以下说明安装 spree gem http://spreecommerce.com/resources/quick-start
安装工作正常,但尝试创建应用程序无法解决
bash: spree: command not found
路径是 /Users/sandbox1/.rvm/gems/ruby-1.9.2-p0/bin:/Users/sandbox1/.rvm/gems/ruby-1.9.2-p0@global/bin:/Users/sandbox1/.rvm/rubies/ruby-1.9.2-p0/bin:/Users/sandbox1/.rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/X11/bin:/usr/X11/bin bash-3.2$
我应该将以下输出中的内容添加到我的 PATH 中吗?
bash-3.2$ find $HOME -name spree
/Users/sandbox1/.rvm/gems/ruby-1.9.2-p0/doc/spree-0.30.0/rdoc/lib/generators/spree
/Users/sandbox1/.rvm/gems/ruby-1.9.2-p0/doc/spree_auth-0.30.0/rdoc/lib/spree
/Users/sandbox1/.rvm/gems/ruby-1.9.2-p0/doc/spree_core-0.30.0/rdoc/lib/spree
/Users/sandbox1/.rvm/gems/ruby-1.9.2-p0/gems/spree-0.30.0/lib/generators/spree
/Users/sandbox1/.rvm/gems/ruby-1.9.2-p0/gems/spree_auth-0.30.0/app/controllers/spree
/Users/sandbox1/.rvm/gems/ruby-1.9.2-p0/gems/spree_auth-0.30.0/lib/spree
/Users/sandbox1/.rvm/gems/ruby-1.9.2-p0/gems/spree_core-0.30.0/app/controllers/spree
/Users/sandbox1/.rvm/gems/ruby-1.9.2-p0/gems/spree_core-0.30.0/app/helpers/spree
/Users/sandbox1/.rvm/gems/ruby-1.9.2-p0/gems/spree_core-0.30.0/lib/spree
/Users/sandbox1/.rvm/gems/ruby-1.9.2-p0/gems/spree_core-0.30.0/public/images/spree
bash-3.2$
最佳答案
Chris 所说:您可以创建一个 Rails 3.0 应用程序并将 spree gem 添加到该应用程序中,如 http://spreecommerce.com/documentation/getting_started.html#creatinga-new-spree-project 中所述.
- 使用例如
rails new spreetest
创建您的项目 - 将
gem 'spree'
添加到 Gemfile - 执行
bundle install
以安装缺少的 gem - 使用
rails g spree:site
和rake spree:install
初始化 spree 站点 - 可选地,安装样本数据
rake spree_sample:install
- 使用
rake db:bootstrap
填充数据库 - 使用
rails server
运行服务器
关于ruby-on-rails - spree 安装问题 - 使用 RVM,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4176664/