Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

2.7 KB
Raw Blame
---
title: Upgrading to Spree 4.3
section: upgrades
order: 0
hidden: true
description: Upgrade a Spree 4.2 application to Spree 4.3 — split out spree_emails, spree_backend, and spree_frontend gems, remove merged extensions, and run migrations.
canonical: "https://spreecommerce.org/docs/v5/developer/upgrades/4.2-to-4.3"
---

<Note>
If you're on an older version than 4.1 please follow previous upgrade guides and perform those upgrades incrementally, eg.

1. [upgrade 3.7 to 4.0](3.7-to-4.0)
2. [upgrade 4.0 to 4.1](4.0-to-4.1)
3. [upgrade 4.1 to 4.2](4.1-to-4.2)
</Note>

## Update Gemfile

Since Spree 4.3 `spree` gem doesn't include `spree_emails`, `spree_backend` and `spree_frontend` gems. It only consists of Spree Core and Spree API.

You need to add them to your Gemfile if you want to use them.

```bash
bundle add spree_emails spree_backend spree_frontend
```

## Remove gems merged into Spree Core

These gems were merged into Spree Core in version 4.3. All of their functionality is now included in the `spree` gem so you can remove them.

### Optional Remove SpreeMultiDomain

If you used that gem in the past you need to remove it.

1. Remove `spree_multi_domain` from your `Gemfile`

    ```bash
    bundle remove spree_multi_domain
    ```

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.

```bash
bundle remove spree_editor
```

### Optional Remove Spree Static Content

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

```bash
bundle remove spree_static_content
```

## Install missing migrations

```bash
rake railties:install:migrations
```

## Run migrations

```bash
bin/rails db:migrate
```

## Additional fixes and hints

### Upgrade Sprockets to v4

In your project create  `app/assets/config/manifest.jss` file with contents:

```ruby
//= link_tree ../images
//= link_tree ../javascripts
//= link_directory ../stylesheets .css
```

More [on this topic](https://github.com/rails/sprockets/blob/main/UPGRADING.md#manifestjs).

### Admin Panel fix

If you've developed custom features for your Admin Panel, please replace any occurrences of

```ruby
render partial: 'spree/shared/error_messages'
```

to

```ruby
render partial: 'spree/admin/shared/error_messages'
```

## Read the release notes

For information about changes contained within this release, please read the [Release notes](https://github.com/spree/spree/releases/v4.3.0).