4.2 to 4.3
This guide covers upgrading a 4.2 Spree application to Spree 4.3.
If you have any questions or suggestions feel free to reach out through Spree slack channels
If you're on an older version than 4.1 please follow previous upgrade guides and perform those upgrades incrementally, eg.
This is the safest and recommended method.

Update Gemfile

1
gem 'spree', '>= 4.3'
Copied!

Remove gems merged into Spree Core

(Optional) Remove SpreeMultiDomain

If you used that gem in the past you need to remove it. Multi-Store is now incorporated into Spree core and you cannot use that gem anymore.
    1.
    Remove spree_multi_domain from your Gemfile
    2.
    Remove //= require spree/frontend/spree_multi_domain from vendor/assets/javascripts/spree/frontend/all.js
    3.
    Remove //= require spree/backend/spree_multi_domain from vendor/assets/javascripts/spree/backend/all.js

(Optional) Remove Spree Editor

Spree 4.3 includes TinyMCE 5 editor built-in. It's not recommended to use spree_editor gem anymore.

(Optional) Remove Spree Static Content

Spree 4.3 includes a built-in CMS. It's not recommended to use spree_static_content

Add Spree modules

Spree 4.3 was split into separate modules which aren't included in the spree package anymore.

(Optional) Add spree_frontend gem

If you use the default Spree Storefront you need to add it to your Gemfile.
1
gem 'spree_frontend', '>= 4.3'
Copied!

(Optional) Add spree_backend gem

If you use the default Spree Admin Panel you need to add it to your Gemfile.
1
gem 'spree_backend', '>= 4.3'
Copied!

(Optional) Add spree_emails gem

Transactional emails once part of spree_core were extracted into their own gem called spree_emails. If you would like to still use this feature you'll need to include this new gem in your Gemfile.
1
gem 'spree_emails', '>= 4.3'
Copied!

Update gems

1
bundle update
Copied!

Install missing migrations

1
bin/rails spree:install:migrations
Copied!

Run migrations

1
bin/rails db:migrate
Copied!

Additional fixes and hints

Upgrade Sprockets to v4

In your project create app/assets/config/manifest.jss file with contents:
1
//= link_tree ../images
2
//= link_tree ../javascripts
3
//= link_directory ../stylesheets .css
Copied!

Update Spree Auth Devise and Spree Gateway

1
bundle update spree_gateway spree_auth_devise
Copied!

Admin Panel fix

If you've developed custom features for your Admin Panel, please replace
1
render partial: 'spree/shared/error_messages'
Copied!
with
1
render partial: 'spree/admin/shared/error_messages'
Copied!

Upgrade all of your Spree extensions to the newest versions

To avoid errors and compatibility issues, please update all of your Spree extension gems to the newest versions which usually include fixes for the new Spree release, eg.
1
bundle update spree_related_products
Copied!

Read the release notes

For information about changes contained within this release, please read the CHANGELOG.

More info

If you have any questions or suggestions feel free to contact us via email or through Spree slack channels
Last modified 1mo ago