4.0 to 4.1
This guide covers upgrading a 4.0 Spree application to Spree 4.1.
If you're on an older version than 4.0 please follow previous upgrade guides and perform those upgrades incrementally, eg.
This is the safest and recommended method.
gem 'spree', '~> 4.1'
gem 'spree_gateway', '~> 3.9'
You have two options:
- 1.Migrate to the new Storefront UI
- 2.Stay at the current UI
Spree 4.1 comes with a completely new mobile-first ultra-fast Storefront powered by Turbolinks.
To replace your current frontend with the new Spree UI follow these steps:
- 1.Update Spree Auth Devise to 4.1 in your
Gemfilegem 'spree_auth_devise', '~> 4.1'
- 2.In your project root directory run:rails g spree:frontend:copy_storefrontWARNING this will overwrite your current project templates, it's required for the new UI, so if you'll be asked by the generator what to do please choose A to proceed
- 6.You will also need to remove this line://= require spree/frontend/spree_authfrom
If you wish to not move to the new Storefront UI it's still an option. Just proceed with the steps described below.
- 1.Keep Spree Auth Devise at the version you're currently usingIf you're using Spree Auth Devise gem you need to lock it at 4.0.0 in your
Gemfile:gem 'spree_auth_devise', '~> 4.0.0'
- 2.Copy over all views from Spree 4.0Copy overviews from: https://github.com/spree/spree/tree/4-0-stable/frontend/app/views to your application views directory:
app/viewsWARNING remember to not overwrite your customizations!
- 3.Copy over all Stylesheets from Spree 4.0Copy over stylesheets from: https://github.com/spree/spree/tree/4-0-stable/frontend/app/assets/stylesheets to
app/stylesheetsWARNING remember to not overwrite your customizations!