title: Registering a custom Spree Calculator not working
body: <p>Following the docs on this page...
  <a href="http://guides.spreecommerce.com/developer/calculators.html" rel="noreferrer">http://guides.spreecommerce.com/developer/calculators.html</a></p>
  
  <p>I've created a class in models/spree/calculators/</p>
  
  <pre><code>module Spree 
  class Calculator::ZipTax &lt;  Calculator
    def self.description
    "Calculates Tax Rates From Zipcode in TaxRates Table"
     end
      def compute(computable)
    case computable
      when Spree::Order
        compute_order(computable)
      when Spree::LineItem
        compute_line_item(computable)
    end
  end
      def compute_order(order)
      zipcode = order.bill_address.zipcode[0,5]
      zip = TaxTable.where(:zipcode =&gt; zipcode).first
      if(zip.present?)
        rate = zip.combined_rate
          order.line_items.sum(&amp;:total) * rate
      else 
        0
      end
  
  end
    end
  end
  </code></pre>
  
  <p>And in initializers/spree.rb I've added:</p>
  
  <pre><code>config = Rails.application.config
  config.spree.calculators.tax_rates &lt;&lt; Spree::Calculator::ZipTax
  </code></pre>
  
  <p>But I can not get Rails to start. I get undefined method `&lt;&lt;' for nil:NilClass (NoMethodError) on the initializer/spree.rb file.</p>
  
  <p>How do I register a custom Calculator? Using Spree 1.3.2.</p>