4.1 to 4.2
This guide covers upgrading a 4.1 Spree application to Spree 4.2.
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.
gem 'spree', '~> 4.2'
gem 'spree_auth_devise', '~> 4.3'
gem 'spree_gateway', '~> 3.9'
gem 'spree_i18n', '~> 5.0'
If you used that gem in the past you need to remove it. Multi-Currency is now incorporated into Spree core and you cannot use that gem anymore.
- 2.Remove these preferences from your Spree initializer (
//= require spree/frontend/spree_multi_currencyfrom
//= require spree/backend/spree_multi_currencyfrom
All international configuration is now kept on the
Storemodel in the database rather than in initializer files.
If you used
spree_i18ngem before please remove any
SpreeI18n::Configreferences from your
If you used Deface overrides you will need to include
Gemfileas it was removed from Spree / Spree Auth Devise / Spree Gateway dependencies.
Simply add it to your
Please find a
add_stock_location_to_rmamigration in your
db/migratedirectory and change:
class AddStockLocationToRma < ActiveRecord::Migration[4.2]
class AddStockLocationToRMA < ActiveRecord::Migration[4.2]
To avoid errors and compatibility issues, please update all of your Spree extension gems to the newest versions which usually includes fixes for the new Spree release, eg.
bundle update spree_related_products
If you're using Spree default Storefront (
spree_frontendgem) make sure to update your templates, especially:
Or simply run
bundle exec rails g spree:frontend:copy_storefront