title: Rails 4: NameError uninitialized constant ActionView::CompiledTemplates::Icons
body: <p>I've stored an array in <code>config/initializers/icons.rb</code>:</p>
  
  <pre><code>class Icons
    def self.emoticons
      emoticons = ['( o_o )', 'ʕ•ᴥ•ʔ']
    end
  end
  </code></pre>
  
  <p>I assumed that I'd be able to access it with the following code from anywhere:</p>
  
  <pre><code>%p= Icons::emoticons.sample
  </code></pre>
  
  <p>or</p>
  
  <pre><code>%p= Icons.emoticons.sample
  </code></pre>
  
  <p>If I do that I get this error:</p>
  
  <pre><code>NameError in Tools#search
  uninitialized constant ActionView::CompiledTemplates::Icons
  </code></pre>
  
  <p>What is wrong with my approach?</p>