public
Description: Spree is a complete open source e-commerce solution for Ruby on Rails.
Home | Edit | New

Rake Tasks

Here is a quick reference for some of the more useful rake tasks with an emphasis on tasks that are specific to Spree. A complete list of tasks can be generated from your command line using rake -T or rake -D.

General

Task Description
rake db:bootstrap Bootstrap your database for Spree. The single most useful task in Spree. Will completely rebuild your database and migrate everything to the latest (including all of your extensions. Will also give you the option of installing some sample data.
rake db:migrate Migrate the database through scripts in db/migrate. Target specific version with VERSION=x. Not very useful since it will not migrate the core extensions that you also need. If you want your extensions to be migrate you will also need to use rake migrate:extensions in addition to this task. Remember, the core extensions that ship with Spree are mandatory (unless replaced by you with a comparable extension.)
rake spree:freeze:gems Lock this application to the current gem (by unpacking it into vendor/spree)
rake spree:unfreeze Unlock this application from freeze of gem (or edge) and return to use of system gem
rake log:clear Truncates all *.log files in log/ to zero bytes


Test Related

Task Description
rake spec Run all specs in spec directory (excluding plugin specs)
rake spec:helpers Run the specs under spec/helpers
rake spec:lib Run the specs under spec/lib
rake spec:models Run the specs under spec/models
rake spec:views Run the specs under spec/views


Extension Related

Task Description
rake spec:extensions Runs specs on all available Spree extensions, pass EXT=extension_name to test a single extension


Gem Related

Task Description
rake spree:gem Build the gem file and install locally (uninstalling the previous version if it exists.)
rake spree:gem:install Build and install Gem from source
rake spree:gem:uninstall Uninstall Gem
Last edited by railsdog, Fri Apr 24 08:56:53 -0700 2009
Home | Edit | New
Versions: