Spree is an open source e-commerce platform that is available as a ruby gem for Ruby on Rails framework. It is intended as a foundation over which developers can build their own e-commerce sites.
Prerequisites
To use Spree you will need to install following:- ruby
- imagemagick
- nodejs
- libxml2
- libxml2-dev
- libssl-dev
- libxslt-dev
- postgresql
- postgresql-server-dev-9.1
Steps
After installing the above listed softwares, install bundler, rails, rake and spree gem using following command:gem install bundler rake rails spree
Now create a new rails application. The default database is Sqlite, so we need to specify that we want postgres:
rails new myspreeapp -d postgresql
Edit config/database.yml and add host: localhost to all configurations and also correct database name, username and password. Next, add spree to your app. To do this run following command from withing your applications root directory:
spree install
This will run a wizard which will ask your choices for running migrations, loading seed data and others and perform the required actions. When the wizard ends your spree application is ready and you can now run it on local host using:
rails s
Your basic spree applications is now available at http://0.0.0.0:3000. You will most probably want to customize this application according to your needs. Head over to spree customization guides for a detailed look at customizing spree.