Ruby HTML CSS JavaScript CoffeeScript Shell
Latest commit 83da139 Feb 17, 2017 @damianlegawiec damianlegawiec committed on GitHub Merge pull request #7814 from spark-solutions/hotfix/payment-method-u…

Issue #7810 - fix for payment method update
Failed to load latest commit information.
.github additional edits Dec 1, 2016
api Fix for #7801: added ransackable_association for product_property Feb 7, 2017
backend Merge pull request #7814 from spark-solutions/hotfix/payment-method-u… Feb 17, 2017
cmd Nicer spec output in extension generator Dec 19, 2016
core Add unscoped method to activerecord query Feb 16, 2017
frontend Merge pull request #7737 from jkelleyj/master Dec 8, 2016
guides Guides: API: Fix typo in checkouts; Mark admin-only order actions Feb 2, 2017
lib sandbox gemfile should include current branch for spree version Jun 28, 2016
sample Proper BSD 3 Licence identifier Dec 6, 2016
.editorconfig Reduce hound spam. Apr 22, 2015
.gitignore Ability to reject payment method based on order Apr 1, 2016
.hound.yml Hound JSHint config added Jul 18, 2016
.jshintrc Setting LOC at 120 for JSHint and adding Spree to predefined variables Jul 19, 2016
.rubocop.yml rubocop fix: TrailingComma is deprecated Feb 7, 2016
.teatro.yml Fix teatro assets compiling Nov 26, 2014
.travis.yml add PhantomJS 2.1.1 on Travis CI Aug 15, 2016 Added 3.3.0 (edge) release notes and link in Dec 7, 2016 add code of conduct from contributor covenant v1.2 Jul 23, 2015
Gemfile Isolate each component of Spree Mar 21, 2012 Ensure vector badges in readme Jan 5, 2017
Rakefile SPREE_VERSION removed, total cleanup of gemspecs and rakefiles, spree… Feb 28, 2016
build-ci.rb Adds metadata collection on Circle CI with rspec_junit_formatter Oct 2, 2016 Fix Jan 27, 2016
circle.yml CircleCI fix - always use newest gem version available Dec 1, 2016
common_spree_dependencies.rb Adds metadata collection on Circle CI with rspec_junit_formatter Oct 2, 2016 Update year range to 2016 Jan 16, 2016
spree.gemspec Proper BSD 3 Licence identifier Dec 6, 2016
spree_logo.png Old/new logo for the Spree Open Source project Jul 27, 2016

Circle CI Code Climate codebeat Slack Status

Spree is a complete open source e-commerce solution built with Ruby on Rails. It was originally developed by Sean Schofield and is now maintained by developers from Spark Solutions and Vinsol. We're open to contributions and accepting new Core Team members.

Spree consists of several different gems, each of which are maintained in a single repository and documented in a single set of online documentation.

  • spree_api (RESTful API)
  • spree_frontend (Customer frontend)
  • spree_backend (Admin panel)
  • spree_cmd (Command-line tools)
  • spree_core (Models & Mailers, the basic components of Spree that it can't run without)
  • spree_sample (Sample data)

Getting Started

Add Spree gems to your Gemfile:

Rails 5

gem 'spree', '~> 3.2.0.rc1'
gem 'spree_auth_devise', '~> 3.2.0.beta'
gem 'spree_gateway', '~> 3.2.0.beta'

Rails 4.2

gem 'spree', '~> 3.1.0'
gem 'spree_auth_devise', '~> 3.1.0'
gem 'spree_gateway', '~> 3.1.0'

Run bundle install

Use the install generators to set up Spree:

rails g spree:install --user_class=Spree::User
rails g spree:auth:install
rails g spree_gateway:install

Installation options

Alternatively, if you want to use the bleeding edge version of Spree, add this to your Gemfile:

gem 'spree', github: 'spree/spree'
gem 'spree_auth_devise', github: 'spree/spree_auth_devise'
gem 'spree_gateway', github: 'spree/spree_gateway'

Note: The master branch is not guaranteed to ever be in a fully functioning state. It is unwise to use this branch in a production system you care deeply about.

By default, the installation generator (rails g spree:install) will run migrations as well as adding seed and sample data. This can be disabled using

rails g spree:install --migrate=false --sample=false --seed=false

You can always perform any of these steps later by using these commands.

bundle exec rake railties:install:migrations
bundle exec rake db:migrate
bundle exec rake db:seed
bundle exec rake spree_sample:load

Browse Store


Browse Admin Interface



Spree Extensions provide additional features not present in the Core system.

Extension Description
spree_i18n I18n translation files for Spree Commerce
spree-multi-domain Multiple Spree stores on different domains - single unified backed for processing orders
spree_multi_currency Provides UI to allow configuring multiple currencies in Spree
spree_braintree_vzero Official Spree Braintree + PayPal extension
spree_address_book Adds address book for users to Spree
spree_digital A Spree extension to enable downloadable products
spree_social Building block for spree social networking features (provides authentication and account linkage)
spree_related_products Related products extension for Spree
spree_active_shipping Spree integration for Shopify's active_shipping gem
spree_static_content Manage static pages for Spree
spree-product-assembly Adds oportunity to make bundle of products
spree_editor Rich text editor for Spree with Image and File uploading in-place
spree_recently_viewed Recently viewed products in Spree
spree_wishlist Wishlist extension for Spree
spree_sitemap Sitemap Generator for Spree


You may notice that your Spree store runs slowly in development environment. This can be because in development each asset (css and javascript) is loaded separately. You can disable it by adding the following line to config/environments/development.rb.

config.assets.debug = false

Developing Spree

Spree is meant to be run within the context of Rails application and the source code is essentially a collection of gems. You can easily create a sandbox application inside of your cloned source directory for testing purposes.

Clone the Git repo

git clone git://
cd spree

Install the gem dependencies

bundle install


Create a sandbox Rails application for testing purposes which automatically perform all necessary database setup

bundle exec rake sandbox

Start the server

cd sandbox
rails server

Running Tests

We use CircleCI to run the tests for Spree.

You can see the build statuses at

Each gem contains its own series of tests, and for each directory, you need to do a quick one-time creation of a test application and then you can use it to run the tests. For example, to run the tests for the core project.

cd core
bundle exec rake test_app
bundle exec rspec spec

If you would like to run specs against a particular database you may specify the dummy apps database, which defaults to sqlite3.

DB=postgres bundle exec rake test_app

If you want to run specs for only a single spec file

bundle exec rspec spec/models/spree/state_spec.rb

If you want to run a particular line of spec

bundle exec rspec spec/models/spree/state_spec.rb:7

You can also enable fail fast in order to stop tests at the first failure

FAIL_FAST=true bundle exec rspec spec/models/state_spec.rb

If you want to run the simplecov code coverage report

COVERAGE=true bundle exec rspec spec

If you're working on multiple facets of Spree to test, please ensure that you have a postgres user:

createuser -s -r postgres

And also ensure that you have PhantomJS installed as well:

brew update && brew install phantomjs

To execute all the tests, you may want to run this command at the root of the Spree project to generate test applications and run specs for all the facets:



Spree is an open source project and we encourage contributions. Please review the contributing guidelines before contributing.

In the spirit of free software, everyone is encouraged to help improve this project.

Here are some ways you can contribute:


Spree is released under the New BSD License.