github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

RSpace / spree-heroku

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 39
    • 6
  • Source
  • Commits
  • Network (6)
  • Issues (0)
  • Downloads (0)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (0)
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

Spree extension for hosting Spree on Heroku — Read more

  cancel

http://casperfabricius.com

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Fixing Compass dependency. 
tobinharris (author)
Mon Dec 28 02:10:37 -0800 2009
RSpace (committer)
Mon Dec 28 11:59:22 -0800 2009
commit  b16a67e3645e193663ed050af0ea23d169965ef2
tree    f7c6dfad1f7a94e2c30964921eedc19ce66c7c8c
parent  f59d6da7a6abf19f90d4ff50e123fb18be5f881a
spree-heroku /
name age
history
message
file .gems Mon Dec 28 11:59:22 -0800 2009 Fixing Compass dependency. [tobinharris]
file MIT-LICENSE Sun Oct 18 06:07:04 -0700 2009 Added MIT license [RSpace]
file README.markdown Sun Oct 18 06:07:04 -0700 2009 Added MIT license [RSpace]
file Rakefile Sun Oct 18 04:53:10 -0700 2009 Initial import [RSpace]
directory app/ Sun Oct 18 04:53:10 -0700 2009 Initial import [RSpace]
directory config/ Sun Oct 18 04:53:10 -0700 2009 Initial import [RSpace]
file heroku_extension.rb Wed Dec 02 11:21:02 -0800 2009 update for spree master 0.9.9 [taweili]
directory lib/ Sun Oct 18 04:53:10 -0700 2009 Initial import [RSpace]
directory spec/ Sun Oct 18 04:53:10 -0700 2009 Initial import [RSpace]
directory vendor/ Sun Oct 18 04:53:10 -0700 2009 Initial import [RSpace]
README.markdown

Spree on Heroku

This is an extension for Spree, allowing the e-commerce system to run on Heroku - http://heroku.com.

The major constraint on Heroku is that we can't write files to disk, so this extension disables all disk caching, fixes a few issues and changes Spree to store on Amazon S3.

Requirements

A Heroku account and an Amazon S3 account with a bucket.

Installation and configuration

Make a Spree application:

spree myapp

Install this extension:

cd myapp
script/extension install git://github.com/RSpace/spree-heroku.git

Copy the .gems manifest to the root of your application:

cp vendor/extensions/heroku/.gems ./

Create a Heroku application and deploy it:

git init
git add .
git commit -m 'Initial create'
heroku create myapp
git push heroku master

Enable SSL, since Spree uses SSL for administration and payment flow in its standard setup:

heroku addons:add "Piggyback SSL"

Bootstrap the database locally (not possible in Heroku, because the rake task attempts to copy files), and transfer it to Heroku:

rake db:bootstrap
heroku db:push

Please note that if you choose to load sample data, images will be missing for all products. Spree's bootstrap task copies the images locally, but it doesn't put them on S3, where this extension configures Spree to look for images.

Configure the extension with your S3 information and restart the application on Heroku:

heroku console
>> Spree::Heroku::Config.set(:bucket => 'bucket name')
>> Spree::Heroku::Config.set(:access_key_id => 'access key')
>> Spree::Heroku::Config.set(:secret_access_key => 'secret access key')
>> exit
heroku restart

That's it - you're done! :)

Troubleshooting

This extension has been tested with Spree 0.9.1. If you have problems using the extension with a newer version of Spree, it could be due to Spree's gem dependencies having changed. The gems in the heroku .gems manifest must mach the gems and versions required by Spree. This page shows the current dependencies of the newest version of Spree: http://gemcutter.org/gems/spree

Thanks to

Mooktakim Ahmed for creating the HerokuSassAndCache plugin, which is bundled with this extension.

Copyright and license

Copyright (c) 2009 Casper Fabricius, released under the MIT license

Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server