nktokyo
nktokyo

Reputation: 642

spree install issue - using RVM

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$ 

Upvotes: 2

Views: 2179

Answers (2)

Anthony Liekens
Anthony Liekens

Reputation: 1081

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.

  1. Create you project with e.g., rails new spreetest
  2. Add gem 'spree' to the Gemfile
  3. Perform bundle install to install missing gems
  4. Initialize the spree site with rails g spree:site and rake spree:install
  5. Optionally, install sample data rake spree_sample:install
  6. Populate the database with rake db:bootstrap
  7. Run the server with rails server

Upvotes: 3

Fábio Batista
Fábio Batista

Reputation: 25260

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 without sudo.

Upvotes: -1

Related Questions