Spree Commerce

Try It Now

The Naked Truth About Clothing and Sales Tax

Posted on April 30, 2014 by Alexander Diegel

The Naked Truth About Clothing and Sales Tax

AvalaraThank you to our partners at Avalara, who hosted a webinar for us on the challenges, and solutions to, the treacherous landscape of managing state-to-state clothing tax laws. From common misconceptions to the specific quirks in certain states (different taxes for different-sized boots?) Avalara covered everything an e-commerce clothing retailer would need to know. Here are some of the highlights:

Webinar host Jennifer Myers stresses the importance of understanding nexus for those in the clothing industry. “Nexus” is the connection between a state and a business, and allows a state to compel an out-of-state company to register and collect sales tax. The out-of-state company must have a “physical presence,” but that definition is changing, something the webinar goes into more detal about.

The webinar will help clarify:

• Whether you have established nexus in the last year
• The confusion regarding Florida, Texas, and New York’s state tax laws on clothing
• Product taxability
• Product Exemptions

Jennifer also details the risks of determining sales tax rates by zip codes, and the inaccuracy of the practice.

For more on managing the treachery of state-to-state tax laws on clothing, you can review the slides here, or view the full webinar.

Red Badger to Host London Spree Commerce Meetup

Posted on April 29, 2014 by Alexander Diegel

The Meetup

The meetup will be hosted in Red Badger’s UK office in London. The general agenda will include an introduction to Spree, how to hack a Spree store in just two days, and Spree client Surfdome’s experience in re-platforming their e-commerce storefront with Spree Commerce. And don’t worry: Food and beverages will be provided.

The meetup will start at 7:00 PM London time on Wednesday, May 14, 2014.

About Red Badger

Red Badger is a UK-based development and design agency with a long-standing tradition of innovation and excellence. They’ve worked with titans such as BBC, BMW and Selfridges. Red Badger is a strong believer in responsive web design, and believe, quite simply, if you aren’t using it, “you’re doing it wrong.”

The Partnership

In mid-March of this year, Red Badger hosted a “Spree Hackathon” at its London headquarters. The goal was for Red Badger to take what it already knew about Spree, apply it to best practices, and expand its knowledge to see if Spree truly was the best platform available to build a unique customer experience. The result was a huge success.

In only two days the developers at the hackathon built a new ecommerce storefront from scratch. One of Spree’s developers was there, and was impressed by the enthusiasm and expertise the Red Badger team was able to provide.

Both sides were so excited by the experience and results from the hackathon that they quickly decided to keep the momentum going. Red Badger created the London meetup group so other Spree enthusiasts can get together and share their experiences. Register today and we will see you in London!

Spree and Ninefold to Host San Francisco Meetup

Posted on April 28, 2014 by Alexander Diegel

The Meetup

On Thursday, May 8, 2014, Spree Commerce and Ninefold will be linking up in San Francisco to host the featured meetup, "The Future of E-Commerce.” The event is for everyone from expert Spree developers to those just wanting to learn more about the industry.

There will be live demos, discussions on projects that are under way, as well as time for people to share their war stories and collaborate on opportunities. And of course there will be food. And beer.

The Meetup will be held between 6:30 and 9:30 PM Pacific.

The Partnership

The partnership between Spree Commerce and Ninefold started when Ninefold shared some incredible research they had done on website load time, using Spree as the basis.

After a popular presentation at SpreeConf 2014, Ninefold decided to take the partnership to the next level and journey all the way from both San Francisco and Australia to visit our DC-area headquarters. While here, Ninefold hosted a fantastic webinar, "Lightining fast Page Load Times, which you can access by registering here. We enjoyed our time brainstorming (not to mention binging on Chipotle) together so much that we decided to do it again, this time in San Francisco, and co-host this meetup.

About Ninefold

Ninefold was founded on a principal of shaking up outdated norms and finding a better way to do things. In that vein, everyone in the Ninefold team believes in making dreams a reality—both their own and those in the community they serve.

Dreaming is how we all challenge the old practices. Ninefold’s dream is to dramatically change the Rails hosting landscape, so that developers no longer have to compromise application ingenuity for easy app deployment. The folks at Ninefold believe compromise is a thing of the past, and work hard to make that belief a reality.

Novel Ways of Deploying Spree Featuring Dokku

Posted on April 24, 2014 by Bruno Buccolo

Dokku: The Smallest PaaS Implementation

Dokku is a new tool to deploy apps that has been getting a lot of attention lately. According to Jeff Lindsay, creator of Dokku and avid open source contributor, Dokku is the smallest PaaS implementation you’ve ever seen. After an easy setup on any host, you’ll have git push deployments and component based architecture. This post will explain how to test it out with a fresh Spree install.

Getting a Fresh Spree Install

This section will cover how to setup a clean Spree install. If you want to skip this process, just clone buccolo/spree_dokku then head over to Setting up Dokku .

The process is simple. We start by installing Rails, which will create a new Rails project.

$ gem install rails -v 4.0.4
$ rails new spree
$ cd spree/

Now add some goodies to the Gemfile:

gem 'pg'
gem 'rails_12factor'
gem 'spree', github: 'spree/spree', branch: '2-2-stable'
gem 'spree_auth_devise', github: 'spree/spree_auth_devise', branch: '2-2-stable'

Bundle up and add some sample data. Also pre-compile your assets to avoid a Dokku bug

$ bundle
$ bundle exec rails g spree:install --migrate=true --sample=true --seed=true
$ bundle exec rake assets:precompile

Now, start Rails and take a moment to admire your new Spree store. You can learn more about how to start using Spree in our Getting Started Guide

Everything is set, now we’ll need a Dokku server to deploy this to.

Setting up Dokku

Dokku is pretty easy to install. To make things even faster, we’ll use Digital Ocean, because it provides an Ubuntu application image with Dokku ready to go. Look for the image Dokku-v0.2.1 on Ubuntu 13.04. It’s recommended to use a server with at least 1GB of RAM, so you don’t swap.

After the server has been bootstrapped, visit the IP address on the browser to set-up Dokku. You can either configure DNS right know by pointing it to your new server, or manually configure the /etc/hosts in your machine so it looks good and you save yourself some trouble:

If you haven’t already, create a git project and commit your Spree store:

$ git init
$ git add .
$ git commit -am "Ready for Dokku"

Now, I promised you git push deploys a la Heroku, so let’s have it:

$ git remote add dokku dokku@sudokku.io:spree
$ git push dokku
Counting objects: 5, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 484 bytes | 0 bytes/s, done.
Total 3 (delta 1), reused 0 (delta 0)
----- Building spree ...
       Ruby app detected


===== Application deployed:

Behind the curtains Dokku is creating a new Docker container and installing our app on it. Notice how we just added a new remote to our git repo and pushed. A Dokku server can serve many apps, making it a really good tool to deploy simple apps. If Ruby is not your thing, no problem; Dokku also supports NodeJS, Java, Scala, Python, Clojure and others!

Now let’s check our app in production, shall we?

Aww :(

What happened? Let’s use Dokku itself to debug, but first a quick alias to speed things up:

$ alias dokku='ssh -t root@sudokku.io dokku'

$ dokku logs spree
(erb):9:in `rescue in <main>': Invalid DATABASE_URL (RuntimeError)
        from (erb):6:in `<main>'

Right! We haven’t even configured a database yet! The Dokku way of solving this is by installing a Postgres Plugin. Now not only will we be able to deploy apps effortlessly, we’ll also be able to create Postgres containers. Installing a plugin is easy:

$ ssh root@sudokku.io

$ cd /var/lib/dokku/plugins
$ git clone https://github.com/Kloadut/dokku-pg-plugin
$ dokku plugins-install
$ logout

Now that we’ve installed the plugin, we can just run some commands to have a Postgres container created for us. The plugin also makes it easy to ‘connect’ a database container to our app container: by calling postgresql:link, the plugin will set DATABASE_URL environment variable and reload our app.

$ dokku postgresql:create spree-pg
$ dokku postgresql:link spree spree-pg
----- Setting config vars and restarting spree
DATABASE_URL: postgres://root:1234@
----- Releasing spree ...
----- Release complete!
----- Deploying spree ...
----- Checking status of PostgreSQL
      Found image postgresql/spree database
      Checking status... ok.
----- Deploy complete!

----- spree linked to postgresql/spree-pg database

Our database is ready. All we have to do now is run the migrations and create the admin user. For the sake of the example, we’re also setting an environment variable to demonstrate how easy it is and to skip configuring SSL: just to log into our app.

$ dokku run spree bundle exec rake db:migrate
$ dokku run spree bundle exec rake spree_auth:admin:create
$ dokku config:set spree RAILS_ENV=development

Whenever you change an environment variable, Dokku takes care of restarting your app. So you should be able to head over to the app to see it live. The screenshot below shows Spree’s admin screen:


Dokku is a pretty exciting tool that makes it really easy to deploy apps and attach services on-demand. You can see by the version number (0.2.1) that it might be too early to use it for complex scenarios. After all, it’s not fair to compare it to other large hosting providers, especially because the hosted PaaS solutions shine when it comes to reliability and scalability.

Further Reading