1.3 to 2.0
This guide covers upgrading a 1.3.x Spree store, to a 2.0.x store.

Overview

This guide has been written from the perspective of a blank Spree 1.3.x store with no extensions.
If you have extensions that your store depends on, you will need to manually verify that each of those extensions works within your 2.0.x store once this upgrade is complete. Typically, extensions that are compatible with this version of Spree will have a 2-0-stable branch.
Given that this is a major release, you may want to read through the 2.0.0 release notes to see what has changed before proceeding with this upgrade.

Upgrade Spree

For best results, use the 2-0-stable branch from GitHub:
1
gem 'spree', github: 'spree/spree', branch: '2-0-stable'```
2
3
Run `bundle update spree`.
4
5
## Bump jquery-rails
6
7
This version of Spree bumps the dependency for jquery-rails to this:
8
9
```ruby
10
gem 'jquery-rails', '3.0.0'```
11
12
Ensure that you have a line such as this in your Gemfile to allow that dependency.
13
14
## Remove middleware
15
16
The two pieces of middleware previously inserted into `config/application.rb` have now been deprecated. Remove these two lines:
17
18
```ruby
19
config.middleware.use "Spree::Core::Middleware::RedirectLegacyProductUrl"
20
config.middleware.use "Spree::Core::Middleware::SeoAssist"```
21
22
## Rename assets
23
24
In Spree 2, assets have been renamed.
25
26
In `store/all.css` and `store/all.js`, you will need to rename the references from `spree_core` to `spree_frontend`. Similarly to this, in `admin/all.css` and `admin/all.js`, you will need to rename the references from `spree_core` to `spree_backend`.
27
28
Additionally, remove references to `spree_promo` from these files. That component of Spree has now been merged with the Core component.
29
30
## Copy and run migrations
31
32
Copy over the migrations from Spree (and any other engine) and run them using
33
these commands:
34
35
rake railties:install:migrations
36
rake db:migrate
37
38
## Read the release notes
39
40
For information about changes contained with this release, please read the [2.0.0 Release Notes](http://guides.spreecommerce.org/release_notes/spree_2_0_0.html).
41
42
## Verify that everything is OK
43
44
Click around in your store and make sure it's performing as normal. Fix any deprecation warnings you see.
Copied!
Last modified 2mo ago
Copy link