title: getting "uninitialized constant ApplicationController" in rails application
body: <p>I am trying to learn <code>Rails 4</code> framework and followed official <a href="http://guides.rubyonrails.org/getting_started.html" rel="nofollow">doc</a></p>
  
  <p>I ran these following commands:</p>
  
  <pre><code>rails new fold
  </code></pre>
  
  <p>It created a new project</p>
  
  <pre><code>rails generate controller home index
  </code></pre>
  
  <p>It generate a <code>home_controller</code> and <code>views/home/index.html.erb</code></p>
  
  <p>Content of <code>home_controller</code> :</p>
  
  <pre><code>class HomeController &lt; ApplicationController
   def index
   end
  end
  </code></pre>
  
  <p>For routing I added following code in <code>routes.rb</code></p>
  
  <pre><code> get 'home/index' =&gt; 'home#index'
  </code></pre>
  
  <p>After running the application I am getting :</p>
  
  <pre><code>uninitialized constant ApplicationController
  </code></pre>
  
  <p>What I am doing wrong here? Here is the <code>Stacktrace</code></p>
  
  <pre><code>app/controllers/home_controller.rb:1:in `&lt;top (required)&gt;'
  activesupport (4.2.4) lib/active_support/inflector/methods.rb:261:in `const_get'
  activesupport (4.2.4) lib/active_support/inflector/methods.rb:261:in `block in constantize'
  activesupport (4.2.4) lib/active_support/inflector/methods.rb:259:in `each'
  activesupport (4.2.4) lib/active_support/inflector/methods.rb:259:in `inject'
  activesupport (4.2.4) lib/active_support/inflector/methods.rb:259:in `constantize'
  actionpack (4.2.4) lib/action_dispatch/routing/route_set.rb:72:in `controller_reference'
  actionpack (4.2.4) lib/action_dispatch/routing/route_set.rb:62:in `controller'
  actionpack (4.2.4) lib/action_dispatch/routing/route_set.rb:41:in `serve'
  actionpack (4.2.4) lib/action_dispatch/journey/router.rb:43:in `block in serve'
  actionpack (4.2.4) lib/action_dispatch/journey/router.rb:30:in `each'
  actionpack (4.2.4) lib/action_dispatch/journey/router.rb:30:in `serve'
  actionpack (4.2.4) lib/action_dispatch/routing/route_set.rb:821:in `call'
  </code></pre>
  
  <p>What is the wrong with the code?</p>