2010-11-14 251 views
2

我尝试使用下面的说明 http://spreecommerce.com/resources/quick-start大礼包安装问题 - 使用RVM

的安装工作正常安装大礼包的宝石,而是试图创建一个应用程序不能解决

bash: spree: command not found 

PATH是 /Users/sandbox1/.rvm/gems/ruby-1.9.2-p0/bin:/Users/sandbox1/.rvm/gems/[email protected]/bin:/Users/sandbox1/。 RVM /红宝石/红宝石1.9.2-P0 /斌:/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$ 
+0

同样的问题在这里的服务器,任何解决方案? – Chris 2010-11-24 09:58:30

+0

实际上,更新版本的spree没有安装命令行工具。相反,它是一个轨道引擎。请参阅“4创建新的Spree项目”:http://spreecommerce.com/documentation/getting_started.html – Chris 2010-11-24 10:23:19

+2

安装Spree的教程声称使用sudo。 [除非你知道你在做什么以及你为什么要这么做,否则如果你的Ruby受RVM控制,请不要在安装gem时使用sudo(http://rvm.beginrescueend.com/rubies/rubygems/)。 RVM使用沙箱,'sudo'将会越狱,并把它放在错误的地方。 – 2011-01-07 15:01:12

回答

-1

从我读上狂欢的主页,他们建议您使用执行的sudo宝石安装。但是,RVM says you should not use sudo。尝试再次安装Gem,这次没有sudo

+1

RVM的全部目的是避免使用sudo以root身份在系统级安装gem。 – Munhitsu 2012-06-26 09:52:13

+0

@Munhitsu,这就是我的回答说,不使用sudo。 – 2012-06-26 19:16:45

3

什么克里斯说:您可以创建一个轨道3.0应用程序,并添加狂欢宝石的应用程序,如http://spreecommerce.com/documentation/getting_started.html#creatinga-new-spree-project中所述。

  1. 创建你如项目,rails new spreetest
  2. 添加gem 'spree'到Gemfile中
  3. 执行bundle install安装缺少的宝石
  4. rails g spree:siterake spree:install
  5. 可选初始化狂欢现场,安装样本数据rake spree_sample:install
  6. 填入数据库rake db:bootstrap
  7. 运行与rails server
+0

Hey LifeSaver !!!感谢您在简单的步骤中完成... – zangeed 2012-08-19 12:58:30