疯狂安装问题 - 使用 RVM
我正在尝试使用以下说明安装 spree gem http://spreecommerce.com/resources/quick-start
安装工作正常,但尝试创建应用程序无法解析
bash: spree: command not found
PATH 是 /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$
I am trying to install the spree gem using the following instructions
http://spreecommerce.com/resources/quick-start
The install worked fine, but trying to create an application doesn't resolve
bash: spree: command not found
PATH is
/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$
Should I add something from the below output to my 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$
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Chris 所说:您可以创建一个 Rails 3.0 应用程序并将 spree gem 添加到应用程序中,如 http://spreecommerce.com/documentation/getting_started.html#creatinga-new-spree-project。
rails new spreetest
创建项目gem 'spree'
添加到 Gemfilebundle install
以安装缺少的 gemrails g spree:site
和rake spree:install
rake spree_sample:install
使用rake db 填充数据库: bootstrap
rails server
运行服务器What Chris said: You can create a rails 3.0 app and add the spree gem to the app, as documented in http://spreecommerce.com/documentation/getting_started.html#creatinga-new-spree-project.
rails new spreetest
gem 'spree'
to the Gemfilebundle install
to install missing gemsrails g spree:site
andrake spree:install
rake spree_sample:install
rake db:bootstrap
rails server
根据我在 Spree 主页上读到的内容,他们建议您使用
sudo
执行 Gem 安装。但是,RVM 表示您不应使用 sudo。尝试再次安装 Gem,这次不使用sudo
。From what I read on Spree homepage, they recommend you to perform the Gem installation using
sudo
. However, RVM says you should not use sudo. Try installing the Gem again, this time withoutsudo
.