OpenSource For You

Trying out Spree

-

The Spree creators have a live demo running at http://demo. spreecomme­rce.com/ to showcase a sample Spree store without admin access. If you want a personal sandbox with full access, you need to sign up at http://spreecomme­rce.com/ one_click/signup, after which a personal store is created, and login credential­s are mailed to you.

For folks who love to get their hands dirty, installing Spree locally on your machine requires very little effort, but some technical chops. Without further ado, let’s get started with installing Spree. For the sake of brevity, assume a system running Ruby on RVM (Ruby Version Manager). First, install the latest Rails gem with gem install rails -v 3.2.3; next, install the Bundler gem with gem install bundler. A very popular image-manipulati­ng library, Image Magick, is used by Spree to manipulate images. If you want to add product images in your store, you need to install this suite. Image Magick installati­on is OS-dependent and a quick Web search will point you to some excellent resources. Finally, install the Spree gem with gem install spree anG yRX’rH GRnH wLWh WhH firVW SarW.

kow, you need to create a Rails applicatio­n that makes use of Spree, with, for example, rails new mythstore; after that, change to the applicatio­n directory (cd mythstore) and install Spree for this applicatio­n (spree install). Spree will ask you some questions regarding the installati­on of sample data. Choose based on your rHTXLrHPHn­WV, Rr hLW ‘(nWHr’ WR JR wLWh WhH GHIaXOW RSWLRnV.

:LWh RaLOV 3.1, an ‘AVVHW 3LSHOLnH’ waV LnWrRGXFHG WR WhH Rails framework in order to concatenat­e and minimise client-side aVVHWV VXFh aV -aYaSFrLSW anG CSS fiOHV. ,W aOVR aOORwV GHYHORSHrV to write assets in languages like Sass or CoffeeScri­pt. This feature Fan FaXVH VRPH SHrIRrPanF­H LVVXHV Ln GHYHORSPHn­W PRGH. TR fix this, issue the following precompile task:

bundle exec rake assets:precompile:nondigest

You are now ready to take Spree for a spin! Start a Web server on your local machine by executing rails s, WhHn firH XS yRXr browser and point it to http://localhost:3000 to see the Web store.

Newspapers in English

Newspapers from India