title: Spree commerce taxonomies error
body: <p>undefined method `each' for nil:NilClass</p>
  
  <pre><code>&lt;% max_level = Spree::Config[:max_level_in_taxons_menu] || 1 %&gt;
    &lt;nav id="taxonomies" class="sidebar-item" data-hook&gt;
  
    &lt;% @taxonomies.each do |taxonomy| %&gt;
      &lt;% unless taxonomy.name == 'Tags' %&gt;
        &lt;h6 class="taxonomy-root"&gt;&lt;%= Spree.t(:shop_by_taxonomy, :taxonomy =&gt; taxonomy.name) %&gt;&lt;/h6&gt;
        &lt;%= taxons_tree(taxonomy.root, @taxon, Spree::Config[:max_level_in_taxons_menu] || 1) %&gt;
  </code></pre>
  
  <p>This is the error i am getting and this is the code i updated to taxonomies.each.to_a not sure if that is right and how do i update the code so the server will run the new code instead of the older code?</p>
  
  <p>Here is the updated code</p>
  
  <pre><code>&lt;% max_level = Spree::Config[:max_level_in_taxons_menu] || 1 %&gt;
  &lt;nav id="taxonomies" class="sidebar-item" data-hook&gt;
    &lt;% @taxonomies.each.to_a do |taxonomy| %&gt;
      &lt;% cache [I18n.locale, taxonomy, max_level] do %&gt;
        &lt;h6 class='taxonomy-root'&gt;&lt;%= Spree.t(:shop_by_taxonomy, :taxonomy =&gt; taxonomy.name) %&gt;&lt;/h6&gt;
        &lt;%= taxons_tree(taxonomy.root, @taxon, max_level) %&gt;
      &lt;% end %&gt;
    &lt;% end %&gt;
  &lt;/nav&gt;
  </code></pre>