2

次の手順を使用して 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$ 
4

2 に答える 2

3

Chris のコメント: http://spreecommerce.com/documentation/getting_started.html#creatinga-new-spree-projectに記載されているように、Rails 3.0 アプリを作成して spree gem をアプリに追加できます。

  1. たとえば、プロジェクトを作成します。rails new spreetest
  2. gem 'spree'Gemfileに追加する
  3. bundle install不足している宝石をインストールするために実行します
  4. rails g spree:siteとスプリーサイトを初期化しますrake spree:install
  5. 必要に応じて、サンプル データをインストールしますrake spree_sample:install
  6. データベースにデータを入力しますrake db:bootstrap
  7. サーバーを実行しますrails server
于 2011-01-07T11:56:46.333 に答える
-1

Spreeのホームページで読んだところによると、を使用してGemのインストールを実行することをお勧めしますsudo。ただし、RVMはsudoを使用しないように指示しています。今回はなしでGemをもう一度インストールしてみてくださいsudo

于 2010-11-14T08:37:44.207 に答える