Here's how to get up and running on Spree Commerce...
We'll be using Rails3 and the Bundler gem. So make sure you've got those installed before moving on....
First create a new rails project:
rails new my_spree_site
Next, remove some unnecessary files:
rm public/index.html public/images/rails.png
Now, just like any other rails app, configure your config/database.yml
file to your liking. When you're ready, open your Gemfile and make it look something like this:
source 'http://rubygems.org'
gem 'rails', '3.0.7'
gem 'mysql2', '0.2.7' # your database adapter (sqlite3/postgres..)
gem 'spree', '0.50.2'
When you're done, save and close the Gemfile, then install your gems with:
bundle install
Once that's complete we need to install Spree into our new rails app. We do that with a rake command:
rake spree:install
This will copy all the necessary migrations, images, javascripts, and stylesheets to your new project. Now we're ready to migrate and prep the database using more rake commands:
rake db:create db:migrate db:seed
Once that's done we can load sample data into the database for development. This step is completely optional...
rake spree_sample:install db:sample
The sample data will load then you'll be prompted to create an admin user. I usually just press enter to use the defaults...
Ok so if everything went according to plan, we should be able to start the server by running:
rails s
If that worked and you see the default spree site, then give yourself a pat on the back or crack open a cold one. Good job!