We recommend upgrading straight to 4.8, as we improved how we handle translations in 4.8.
This also means easier database migration, especially if you have a big product catalog.
If you’re on an older version than 4.4 please follow previous upgrade guides and perform those upgrades incrementally, eg.
Upgrade Rails
Rails 6.0 is no longer supported - if you haven’t already, you’ll need to upgrade to Rails 6.1 or 7.x.
If using Rails 7, you will need to install libvips on your cloud environment, as Rails 7 uses vips as its default variant processor. You can still use imagemagick, but you’ll need to manually set it in your Rails config.
Rails 7 specific changes
Update Spree Config
If you’re upgrading your app to Rails 7, you’ll need to make a slight update to your spree config initializer. Inconfig/initializers/spree.rb
, wrap the Spree.config
block in a Rails.application.config.after_initialize
block, like so:
Update other initializers
Just like withSpree::Config
, you may need to update other intializers in your application, that use autoloadable constants.
For example, if you use spree_auth_devise
, you’ll need to update config/initializers/devise.rb
and wrap the configuration in Rails.application.config.after_initialize
block:
Update gems
Run the following command to update your gems to 4.4:Gemfile
: