Before proceeding to upgrade, please ensure you’re at Spree 5.1
Upgrade steps
Update gems
Install propshaft gem
Spree 5.2 does not rely on sprockets gem anymore. You can either add sprockets to your Gemfile or move to propshaft gem (recommended).
Propshaft is the new default asset pipeline for Rails 7+ applications. It’s more performant and has better support for modern browsers.
Please run the following command to install propshaft gem:
Install and run missing migrations
Migrate to Metafields or keep using Product Properties
Spree 5.2 introduces Metafields, which are a new way to store additional information about an object. Previously, we used Product Properties to enrich products. Metafields are more powerful, more flexible and can be attached to any object not just products. However we now that properties were available in Spree since it’s beginning. So we decided to keep them for backward compatibility until Spree 6.0 to give you time to migrate to metafields. To keep using Product Properties, you will need to set a configuration flag in yourconfig/initializers/spree.rb file:
Migrate store policies
Spree 5.2 introduces more flexible way to manage store policies (eg. terms of service, privacy policy, returns policy, shipping policy). Previously they were just attributes (rich text fields) on the Store model. Now they are stored in the new Policy model. To migrate to the new system, you will need to run the following command:Migrate Product Details pages to PDP 2.0 with blocks and metafields (Optional)
Only applicable if you’re using
spree_storefront gem.Update Storefront to Tailwind v4 or stay on v3 (Optional)
Only applicable if you’re using
spree_storefront gem.Option A: Update to Tailwind v4
Runningbundle update previously installed Tailwind v4. You only need to run
- Overwrite
config/tailwind.config.jsfile with the new Tailwind v4 configuration. - Add
app/assets/tailwind/application.cssfile with the new Tailwind v4 styles. If you modifiedapp/assets/stylesheets/application.tailwind.cssfile, you will need to merge your changes with the new one.
Option B: Stay on Tailwind v3
You can stay on Tailwind v3 by running the following command: Add these line to yourGemfile:

