【问题标题】:spree install issue - using RVM大礼包安装问题 - 使用 RVM
【发布时间】: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$ 

【问题讨论】:

标签: ruby-on-rails ruby spree


【解决方案1】:

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:siterake spree:install 初始化spree 站点
  5. (可选)安装示例数据rake spree_sample:install
  6. 使用rake db:bootstrap 填充数据库
  7. 使用rails server 运行服务器

【讨论】:

    【解决方案2】:

    根据我在 Spree 主页上看到的内容,他们建议您使用 sudo 执行 Gem 安装。但是,RVM says you should not use sudo。再次尝试安装 Gem,这次不要使用 sudo

    【讨论】:

    • RVM 的全部目的是避免使用 sudo 在系统级别以 root 身份安装 gem。
    • @Munhitsu,这就是我的回答,不要使用 sudo。
    猜你喜欢
    • 2016-06-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多