2

我正在尝试使用以下说明安装 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/本地/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$ 
4

2 回答 2

3

Chris 所说的:您可以创建一个 rails 3.0 应用程序并将 spree gem 添加到应用程序中,如http://spreecommerce.com/documentation/getting_started.html#creatinga-new-spree-project中所述。

  1. 创建你的项目,例如,rails new spreetest
  2. 添加gem 'spree'到 Gemfile
  3. 执行bundle install以安装缺少的 gem
  4. rails g spree:site使用和初始化 spree 站点rake spree:install
  5. (可选)安装示例数据rake spree_sample:install
  6. 填充数据库rake db:bootstrap
  7. 运行服务器rails server
于 2011-01-07T11:56:46.333 回答
-1

根据我在 Spree 主页上阅读的内容,他们建议您使用sudo. 但是,RVM 说你不应该使用 sudo。尝试再次安装 Gem,这次不安装sudo.

于 2010-11-14T08:37:44.207 回答