We'll be using Bundler and Rails 3.1, 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.1.3' gem 'pg' gem 'spree', '0.70.3'
When you're done, save and close the Gemfile, then install your gems with:
Once that's complete we need to install Spree into our new rails app. We do that with a rake command:
rails g spree:site
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:
bundle exec 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!