1.1 to 1.2
This guide covers upgrading a 1.1.x Spree store, to a 1.2.x store.

Overview

This guide has been written from the perspective of a blank Spree 1.1.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 1.2.x store once this upgrade is complete. Typically, extensions that are compatible with this version of Spree will have a 1-2-stable branch.

Upgrade Spree

For best results, use the 1-2-stable branch from GitHub:
1
gem 'spree', github: 'spree/spree', branch: '1-2-stable'```
2
3
Run `bundle update spree`.
4
5
## Authentication dependency
6
7
In this release, the `spree_auth` component was moved out of the main set of
8
gems into an extension, called `spree_auth_devise`. If you want to continue using Spree's authentication, then you will need to specify this extension as a dependency in your `Gemfile`:
9
10
```ruby
11
gem 'spree_auth_devise', github: 'spree/spree_auth_devise', branch: '1-2-stable'```
12
13
Run `bundle install` to install this extension.
14
15
### Rename current_user to current_spree_user
16
17
To ensure that Spree does not conflict with any authentication provided by the application, Spree has renamed its `current_user` variable to `current_spree_user`. You should make this change wherever necessary within your application.
18
19
Similar to this, any references to `@user` are now `@spree_user`.
20
21
## Copy and run migrations
22
23
Copy over the migrations from Spree (and any other engine) and run them using
24
these commands:
25
26
rake railties:install:migrations
27
rake db:migrate
28
29
This may copy over additional migrations from spree_auth_devise and run them as well.
30
31
## Read the release notes
32
33
For information about changes contained with this release, please read the [1.2.0 Release Notes](http://guides.spreecommerce.org/release_notes/spree_1_2_0.html).
34
35
## Verify that everything is OK
36
37
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