Ruby on Rails Ecommerce platform, perfect for your small business solution.
Ruby JavaScript HTML CSS
Latest commit 762bc57 Apr 17, 2017 @drhenner committed on GitHub Merge pull request #178 from bryant1410/master
Thank you.
Failed to load latest commit information.
app rename variable to not collide with cart_items Feb 15, 2017
autotest good news and bad news... tests are running correctly now... bad news… Oct 18, 2010
bin bin file for heroku/ rails4 Oct 9, 2013
config checking if cart items equal order items Jan 25, 2017
db added stock notifications and UI improvements Aug 14, 2016
lib merge and add new test Apr 22, 2016
public update favicon Jan 10, 2013
script bulk commit, how bout that for rails rumble lol Oct 17, 2010
solr/conf bulk commit, how bout that for rails rumble lol Oct 17, 2010
spec EOF line Feb 15, 2017
test Using FactoryGirl::Syntax::Methods to be less verbose Jun 10, 2012
vendor upgrade ZURB on customer facing site Sep 29, 2013
.gitignore ignore .byebug_history Jun 13, 2016
.gitmodules bulk commit, how bout that for rails rumble lol Oct 17, 2010
.rspec rspec option May 8, 2013
.ruby-gemset Switch to .ruby-version Jun 14, 2014
.ruby-version rails5 looks to be working Jul 2, 2016
.travis.yml work on adding travis ci support Sep 8, 2012 Fix broken Markdown headings Apr 18, 2017 give credit to TopperH…. i don't know his name. :) Feb 4, 2013
Gemfile update gems Nov 9, 2016
Gemfile.lock update gems Nov 9, 2016
LICENSE update license to state 2013 Dec 31, 2012 Fix broken Markdown headings Apr 18, 2017
Rakefile all is working with rake 0.9.0 now. May 26, 2011 Fix broken Markdown headings Apr 18, 2017
VERSION rails 4.2 ruby 2.1.5 spec upgrades Nov 30, 2014 bulk commit, how bout that for rails rumble lol Oct 17, 2010 Add Aug 14, 2014
next_stuff.txt Referrals are complete... take off of todo list Aug 18, 2014

ROR Ecommerce

Project Overview

Please create a ticket on github if you have issues. They will be addressed ASAP.

Please look at the homepage for more details. Or take a look at the github page

RoR Ecommerce. Code Climate

This is a Rails e-commerce platform. ROR Ecommerce is a Rails 5 application with the intent to allow developers to create an ecommerce solution easily. This solution includes an Admin for Purchase Orders, Product creation, Shipments, Fulfillment and creating Orders. There is a minimal customer facing shopping cart understanding that this will be customized. The cart allows you to track your customers' cart history and includes a double entry accounting system.

The project has Solr searching, Compass and Zurb Foundation for CSS and uses jQuery. Currently the most complete Rails solution for your small business.

Please use Ruby 2.3 and enjoy Rails 5.

ROR Ecommerce is designed so that if you understand Rails you will understand ROR_ecommerce. There is nothing in this project besides what you might see in a normal Rails application. If you don't like something, you are free to just change it like you would in any other Rails app.

Contributors are welcome! We will always need help with UI, documentation, and code, so feel free to pitch in. To get started, simply fork this repo, make any changes (big or small), and create a pull request.


Take a look at The Demo. The login name is with a password => test123

NOTE: Given that everyone has admin rights to the demo it is frequently looking less than "beautiful".

Getting Started

Please feel free to ask/answer questions in our Google Group.

Install RVM with Ruby 2.3. If you have 2.3 on your system you're good to go. Please refer to the RVM site for more details.

Copy the database.yml for your setup. For SQLite3, cp config/database.yml.sqlite3 config/database.yml. For MySQL, cp config/database.yml.mysql config/database.yml and update your username/password.

If you are using the mysql dmg file to install mysql you will need to edit your ~/.bash_profile and include this:

export DYLD_LIBRARY_PATH=/usr/local/mysql/lib:$DYLD_LIBRARY_PATH

Install gems and build the app

gem install bundler
bundle install
rake secret # copy/paste the output as `encryption_key` in `config/settings.yml`
rake db:create:all
rake db:migrate db:seed
RAILS_ENV=test rake db:test:prepare
RAILS_ENV=test rake db:seed

Once everything is set up, start the server with rails server and direct your web browser to localhost:3000/admin/overviews. Write down the username/password (these are only shown once) and follow the directions.

Environmental Variables

Most users are using Amazon S3 or Heroku. Thus we have decided to have a setup easy to get your site up and running as quickly as possible in this production environment. Hence you should add the following ENV variables:

FOG_DIRECTORY     => your bucket on AWS
AWS_ACCESS_KEY_ID => your access key on AWS
AWS_SECRET_ACCESS_KEY => your secret key on AWS
AUTHNET_LOGIN     => if you use otherwise change config/settings.yml && config/environments/*.rb
AUTHNET_PASSWORD  => if you use otherwise change config/settings.yml && config/environments/*.rb

On linux:

export FOG_DIRECTORY=xxxxxxxxxxxxxxx
export AWS_ACCESS_KEY_ID=xxxxxxxxxxxxxxx
export AWS_SECRET_ACCESS_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
export AUTHNET_LOGIN=xxxxxxxxxxx
export AUTHNET_PASSWORD=xxxxxxxxxxxxxxx

On Heroku:

heroku config:add FOG_DIRECTORY=xxxxxxxxxxxxxxx
heroku config:add AWS_ACCESS_KEY_ID=xxxxxxxxxxxxxxx
heroku config:add AWS_SECRET_ACCESS_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
heroku config:add AUTHNET_LOGIN=xxxxxxxxxxx
heroku config:add AUTHNET_PASSWORD=xxxxxxxxxxxxxxx

heroku labs:enable user-env-compile -a myapp

This is needed for using sendgrid on heroku(config/initializers/mail.rb):

heroku config:add SENDGRID_USERNAME=xxxxxxxxxxx
heroku config:add SENDGRID_PASSWORD=xxxxxxxxxxxxxxx

Quick Evaluation

If you just want to see what ror_ecommerce looks like, before you enter any products into the database, run the following command:

rake db:seed_fake

If you have not already done so point your browser to and set up the admin user.

You should now have a minimal dataset, and be able to see a demo of the various parts of the app. Note: make sure you have config/settings.yml set up correctly before you try to checkout. Also, please take a look at The 15 minute e-commerce video.

ImageMagick and rMagick on OS X 10.8

If installing rMagick on OS X 10.8 and using Homebrew to install ImageMagick, you will need to symlink across some files or rMagick will not be able to build.

Do the following in the case of a Homebrew installed ImageMagick(and homebrew had issues):

* cd /usr/local/Cellar/imagemagick/6.8.9-8/lib
* ln -s libMagick++-6.Q16.5.dylib   libMagick++.dylib
* ln -s libMagickCore-6.Q16.2.dylib libMagickCore.dylib
* ln -s libMagickWand-6.Q16.2.dylib libMagickWand.dylib

* you may need to change the version path if the imagemagick has been updated


If you would like to read the docs, you can generate them with the following command:

yardoc --no-private --protected app/models/*.rb

Payment Gateways

First, create config/settings.yml and change the encryption key and paypal/ information. You can also change config/settings.yml.example to config/settings.yml until you get your real info.

To change from authlogic to any other gateway look at the documentation HERE


Paperclip will throw errors if not configured correctly. You will need to find out where Imagemagick is installed. Type: which identify in the terminal and set


equal to that path in config/paperclip.rb.



Paperclip.options[:command_path] = "/usr/local/bin"


Paperclip.options[:command_path] = "/usr/bin"

Adding Dalli For Cache and the Session Store

While optional, for a speedy site, using memcached is a good idea.

Install memcached. If you're on a Mac, the easiest way to install Memcached is to use homebrew:

brew install memcached

memcached -vv

To Turn On the Dalli Cookie Store

Remove the cookie store on line one of config/initializers/session_store.rb. In your Gemfile add:

gem 'dalli'


bundle install

Finally uncomment the next two lines in config/initializers/session_store.rb

require 'action_dispatch/middleware/session/dalli_store'
Hadean::Application.config.session_store :dalli_store, :key => '_hadean_session_ugrdr6765745ce4vy'

To Turn On the Dalli Cache Store

It is also recommended to change the cache store in config/environments/*.rb

config.cache_store = :dalli_store

Adding Solr Search

brew install solr

Uncomment the following in your gemfile:

#gem 'sunspot_solr'
#gem 'sunspot_rails'


bundle install

Start Solr before starting your server:

rake sunspot:solr:start

Go to product.rb and uncomment:

#include ProductSolr

Also remove the method:

def self.standard_search

Take a look at setting up Solr - Solr in 5 minutes

If you get the error, Errno::ECONNREFUSED (Connection refused - connect(2)): when you try to create a product or upload an image, you have not started Solr search. You need to run rake sunspot:solr:start, or remove Solr completely.

Remember to run rake sunspot:reindex before doing your search if you already have data in the DB


  • more documentation

SETUP assets on S3 with CORS

Putting assets on S3 can cause issues with FireFox/IE. You can read about the issue if you search for "S3 & CORS". Basically FF & IE are keeping things more secure but in the process you are required to do some setup.

I ran into the same thing with assets not being public for IE and FireFox but Chrome seemed to work fine. There is a work around for this though. There is something called a CORS Config that opens up your assets to whatever domains you specify.

Here's how to open up your assets to your website. (Thanks @DTwigs)

  • Click on your bucket.
  • Click on the properties button to open the properties tab.
  • Expand the "Permissions" accordion and click " Add CORS Configuration"

Now paste this code in there:

<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="">

Image Groups

Typically a product has many variants. (Variant ~= specific size of a given shoe)

If you have many variants with the same image don't bother with an image group, just use the "products.images".

Use ImageGroups for something like shoes. Lets say you have 3 colors, and each color has 10 sizes. You would create 3 images groups (one for each color). The image for each size would be the same and hence each variant would be associated to the same image_group for a given color.


RoR Ecommerce was created by David Henner. Contributors.


Shipping categories are categories based off price:

you might have two shipping categories (light items) & (heavy items) where heavy items are charged per item purchased and light items are charged once for all items purchased. (hence buying 30 feathers has the same shipping charges as one feather)

Have fun!!!