Spree Commerce

Try It Now

Spree Command Line Tool

Posted on January 12, 2012 by cmar

We have moved the spree binary to its own gem. The new spree_cmd gem includes a rewritten binary to add Spree to an existing Rails application.

Start by installing the latest release candidate for Spree. Then install Spree into a new Rails app with the command line tool. It will modify your Gemfile, copy migrations, set up your initailizers and generate sample data.

<p>$ gem install spree -v=1.0.0.rc2 &#8212;pre<br />
$ rails new my_store<br />
$ cd my_store<br />
$ spree install &#8212;edge</p>

If you would like to add spree without being prompted you can pass the --auto_accept option.

The Spree gem has lots of dependencies (which are normally handled when using bundler.) If you have trouble installing the Spree gem try installing spree_cmd directly and use the following alternative approach.

<p>$ gem install spree_cmd &#8212;pre<br />
$ rails new my_store<br />
$ cd my_store<br />
$ spree_cmd install &#8212;edge</p>

The extension generator has been moved to spree_cmd as well. It will generate a folder with all the setup needed to integrate your extension with a Spree application.

$ spree extension my_ext

It will generate a Versionfile for you. This is used to designate which version of your extension will work with different releases of Spree. Read more about Versionfiles

If you are going to release your extension publicly. Please register your extension