20
SPREE for Ruby on Rails with Islam Mušić

Rails Spree My Pain :)

Embed Size (px)

Citation preview

Page 1: Rails Spree My Pain :)

SPREE for Ruby on Rails

with Islam Mušić

Page 2: Rails Spree My Pain :)

Will it make it easier on you now You got someone to blame (U2)

• Spree is a complete open source e-

commerce solution for Ruby on Rails.

• Started in 2007

• Current version (stable): 2.3

• Github last update: minutes ago

• Is it useful: YES

• Documentation: 7/10 (my opinion)

Page 3: Rails Spree My Pain :)

On the wrong day of the wrong

weekI used the wrong method with the wrong technique

(Depeche Mode)

• Heroku host

• Open source (New BSD License)

• Ruby on Rails

• It’s been around for a while

• I know my shit

Page 4: Rails Spree My Pain :)

Još uvek ti djavoli vire iz rukavasvaki nokat krije otrov ljubavi (Ekatarina Velika)

• First installation: great

• Start the configuration: fist signs of pain

• Try to deploy it on Heroku: PAIN

• Try to change template: pain

• Heroku + Spree: PAIN level 11 reached

• Heroku + Spree + AWS: Don’t even ask

• Ask for help: thx Oto

• Figured out how to use Spree: not bad

• Days before launch: It was not that bad experience

Page 5: Rails Spree My Pain :)

I tried so hard and got so far But in the end it doesn’t even matter (LINKIN PARK)

• Any questions?

Page 6: Rails Spree My Pain :)

I'm Going Deeper Underground There's too much panic in this Town … (JAMIROQUAI)

• Start with fresh Rails installation

• Deploy app to Heroku

• Add Spree to app

• Deploy app to Heroku

Page 7: Rails Spree My Pain :)

When things are big that should be

smallWho can tell what magic spells we'll be doing for us (Jamiroquai)

• Spree, Heroku, AWS

• I used USA AWS

configuration to

avoid Spree pain

• Do the whole

configuration of your app first

Page 8: Rails Spree My Pain :)

Ali mi dovoljuješ ali smempolizat prah iz tvojih ven (Res Nullius)

• Spree has a cool view structure

• You can change any view you want

• Just override the original one

• Use https links if you use

stuff from another server

• Learn turbolinks

before you start!

Page 9: Rails Spree My Pain :)

Pred nama nisu godineal' mogu biti najdulji sati (Darko Rundek)

• Read the Spree documentation first

• Spree is overriding some Rails stuff

My pain was email – Spree has default

“don’t send email”

• Spree item options are BAD (color, size

…)

• Some parts of documentations are

outdated

Page 10: Rails Spree My Pain :)

And if it don't feel goodWhat are you doing it for (Robbie Williams)

• Do the whole configuration before you

start testing your page

• TAX category is a must

• ZONES

– You have to have all countries in some zone,

or you can’t ship to that country

– If you don’t fix it correctly – your payment

won’t go through (and it won’t say why )

Page 11: Rails Spree My Pain :)

I've looked but I just can't find She has gotten lost in the crowd (Rolling Stones)

• Country and State problem

– With the use of my custom JS – I somehow

broke the Spree JS and could not ship the

items to Country that has no State

– Solution: Now you can only chose Country

• Use default Spree data to fill your

database with all the Countries and States

Page 12: Rails Spree My Pain :)

I dried your tears of pain, babeA million times for you (Billy Idol)

• Shipping methods has to involve all the

zones that you are shipping to.

• STOCK location and important because it

can give someone different shipment

payment

• Stock management

• Variants

• Item prototypes

Page 13: Rails Spree My Pain :)

So take this wine and drink with meAnd let's delay our misery (EAGLE-EYE CHERRY)

• Heroku – Free – All good

• Invoice statistic print

• Labels print

• API for Cards

• Communication with clients inside Spree

Page 14: Rails Spree My Pain :)

Some config files

development.rb

Page 15: Rails Spree My Pain :)

production.rb

Page 16: Rails Spree My Pain :)

asset_sync.rb, paperclip.rb

Page 17: Rails Spree My Pain :)

spree_images_paperclip.rb

Page 18: Rails Spree My Pain :)

spree.rb

Page 19: Rails Spree My Pain :)

• Any questions?

• It is really the end of my presentation

• Thanks to: Maja, Matej, Elvis, Oto, Jure,

Luka, Miha and bartenders in Kavarna

Nova

Did I disappoint youOr leave a bad taste in your mouth (U2)

Page 20: Rails Spree My Pain :)

But before you come to any

conclusionsTry walking in my shoes (Depeche mode)

BEFORE

• I was married

• I never drink any

alcohol

• I never used any

drugs

• I didn’t drink coffee

(on regular base)

• I had some kind of

“bioritem”

AFTER

• I’m divorced

• I started to drink

• I tasted some

“homemade cookies”

• I have more coffee

than I need

• I sleep when I can

• I FEEL AWESOME !!!