我正在尝试使用以下说明安装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/红宝石/红宝石1.9.2-P0 /斌:/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$
答案 0 :(得分:3)
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
安装缺失的宝石rails g spree:site
和rake spree:install
rake spree_sample:install
rake db:bootstrap
rails server
答案 1 :(得分:-1)
根据我在Spree主页上看到的内容,他们建议您使用sudo
执行Gem安装。但是,RVM says you should not use sudo。尝试再次安装Gem,这次没有sudo
。