title: LoadError in BooksController#create,Unable to autoload constant BooksController, expected
body: <pre><code>    My Application name is LibraryWebApplication when I accessing my new.erb file using /books/new its giving the form then I filled the form with title,price,description then I clicked the button create its is going to following url /books/create but its is not storing data into data base its showing the following error 
  
      LoadError in BooksController#create
  
      Unable to autoload constant BooksController, expected D:/RailsAppsExamples/LibrarayWebApplication/app/controllers/books_controller.rb to define it
  
      the stack trace is 
  
      tarted POST "/books/create" for 127.0.0.1 at 2014-03-18 16:24:39 +0530
  
      LoadError (Unable to autoload constant BooksController, expected D:/RailsAppsExamples/LibrarayWebApplication/app/controllers/books_controller.rb to define it):
        activesupport (4.0.3) lib/active_support/dependencies.rb:464:in `load_missing_constant'
        activesupport (4.0.3) lib/active_support/dependencies.rb:184:in `const_missing'
        actionpack (4.0.3) lib/action_dispatch/routing/route_set.rb:680:in `call'
        rack (1.5.2) lib/rack/etag.rb:23:in `call  
  
      I have two models
  
      book.rb
  
          class Book &lt; ActiveRecord::Base
              belongs_to :subject
              validates_presence_of :title
            validates_numericality_of :price, :message=&gt;"Error Message"
          end
  
      subject.rb
  
          class Subject &lt; ActiveRecord::Base
              has_many :books
          end
  
  What is mean by Unable to auto load constant Books Controller I am helpless to find/detect the problem in my application
    I used Strong Parameters as I am using Rails4 and I am new to ruby and rails
      is it require to write the Strong Parameters..is to match the permit parameters with database tables parameters
  
  my controller is
  
          books_controller.rb
      class BookController &lt; ApplicationController
         def list
            @books = Book.find(:all)
         end
         def show
            @book = Book.find(params[:id])
         end
         def new
            @book = Book.new
            @subjects = Subject.find(:all)
         end
         def create
            @book = Book.new(params[:book])
            if @book.save
                  redirect_to :action =&gt; 'list'
            else
                  @subjects = Subject.find(:all)
                  render :action =&gt; 'new'
            end
         end
          private
          def book_params
            params.require(:book).permit(:title,:price)
          end
  
         def edit
            @book = Book.find(params[:id])
            @subjects = Subject.find(:all)
         end
         def update
            @book = Book.find(params[:id])
            if @book.update_attributes(params[:book])
               redirect_to :action =&gt; 'show', :id =&gt; @book
            else
               @subjects = Subject.find(:all)
               render :action =&gt; 'edit'
            end
         end
         def delete
            Book.find(params[:id]).destroy
            redirect_to :action =&gt; 'list'
         end
         def show_subjects
            @subject = Subject.find(params[:id])
         end
      end
  
      my routes.rb is
  
          LibrarayWebApplication::Application.routes.draw do
              get 'books/new'
              post 'books/create'
            get 'books/list'
             get 'books/show'
            get 'books/edit'
           get 'books/show_subjects'
          end
  
  
  new.erb file is
  
  
          &lt;h1&gt;Add new book&lt;/h1&gt;
          &lt;%= form_tag :action =&gt; 'create' %&gt;
          &lt;p&gt;&lt;label for="book_title"&gt;Title&lt;/label&gt;:
          &lt;%= text_field 'book', 'title' %&gt;&lt;/p&gt;
          &lt;p&gt;&lt;label for="book_price"&gt;Price&lt;/label&gt;:
          &lt;%= text_field 'book', 'price' %&gt;&lt;/p&gt;
          &lt;p&gt;&lt;label for="book_subject"&gt;Subject&lt;/label&gt;:
          &lt;%= collection_select(:book,:subject_id,@subjects,:id,:name) %&gt;&lt;/p&gt;
          &lt;p&gt;&lt;label for="book_description"&gt;Description&lt;/label&gt;&lt;br/&gt;
          &lt;%= text_area 'book', 'description' %&gt;&lt;/p&gt;
          &lt;%= submit_tag "Create" %&gt;
          &lt;%= link_to 'Back', {:action =&gt; 'list'} %&gt;
  
  
  migration files are
  
  
       20140318084539_books.rb
  
          class Books &lt; ActiveRecord::Migration
           def self.up
               create_table :books do |t|
            t.column :title, :string, :limit =&gt; 32, :null =&gt; false
            t.column :price, :float
            t.column :subject_id, :integer
            t.column :description, :text
            t.column :created_at, :timestamp
               end
            end
  
            def self.down
              drop_table :books
            end
          end
  
      20140318084609_subjects.rb
  
          class Subjects &lt; ActiveRecord::Migration
            def self.up
                create_table :subjects do |t|
                 t.column :name, :string
              end
              Subject.create :name =&gt; "Physics"
              Subject.create :name =&gt; "Mathematics"
              Subject.create :name =&gt; "Chemistry"
              Subject.create :name =&gt; "Psychology"
              Subject.create :name =&gt; "Geography"
            end
  
            def self.down
                drop_table :subjects
            end
          end
  </code></pre>
  
  <p>Is it required to all column names in strong parameters code,can you tell me how to write the Strong parameters for my applications.. I am unable to move forward 
      I have two tables books and subject</p>
  
  <pre><code>    books columns are as
      follows 
      id,title,price,subject_id, Description,created_at
  
      and subjects table columns are
      id,name
  </code></pre>
  
  <p>Is it required to all column names in strong parameters code,can you tell me how to write the Strong parameters for my applications.. I am unable to move forward 
      I have two tables books and subject
      I am unable to find the problem in the application for Load Error in Books Controller#create is it require to write the Strong Parameters..is to match the permit parameters with database tables parameters</p>