【发布时间】:2011-05-09 18:23:14
【问题描述】:
我正在尝试使用以下说明安装 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$
【问题讨论】:
-
同样的问题,有解决办法吗?
-
实际上,新版本的 spree 并没有安装命令行工具。相反,它是一个 Rails 引擎。请参阅此处的“4 创建新的 Spree 项目”:spreecommerce.com/documentation/getting_started.html
-
安装 Spree 的教程说使用 sudo。 Do NOT use sudo when installing a gem if your Ruby is under RVM's control 除非您知道自己在做什么以及为什么要这样做。 RVM 使用沙盒,
sudo会越狱并将 gem 放在错误的位置。
标签: ruby-on-rails ruby spree