You will need to wrap your configuration in after_initialize:
in config / application.rb
config.after_initialize do config.spree.calculators.tax_rates << Spree::Calculator::ZipTax end
You encountered an error because the spree calculators were not initialized at this point in the application loading process, so you are trying to add a calculator to something zero.
Another method commonly used in Spree extensions is as follows:
initializer 'spree.register.calculators' do |app| app.config.spree.calculators.shipping_methods << Spree::Calculator::ZipTax end
source share