title: ActionController::RoutingError (uninitialized constant CommonWarningsController)
body: <p>I am coding a Ruby on Rails app (rails 4), on an ubuntu machine.</p>
  
  <p>I have created a new scaffold (model/view/controller) via <code>rails g scaffold common_warnings</code> , and it works just fine on my local machine (localhost:3000/common_warnings resolves to something appropriate), however when I upload this to my server, I get this error:</p>
  
  <pre><code>ActionController::RoutingError (uninitialized constant CommonWarningsController)
  </code></pre>
  
  <p>when trying to get mydomain.com/common_warnings.</p>
  
  <p>I know that sometimes pluralization is a problem, these are the first lines of each of my controller and model files:</p>
  
  <p>app/controllers/common_warnings_controller.rb </p>
  
  <pre><code>class CommonWarningsController &lt; ApplicationController
  </code></pre>
  
  <p>app/models/common_warning.rb</p>
  
  <pre><code>class CommonWarning &lt; ActiveRecord::Base
  </code></pre>
  
  <p>My rails app already has 30something tables in the database, I know I did have this problem a while ago but just can't work out how to fix this one.  The pluralization seems to match what I do for loan_histories_controller.rb (also a multi-word name).</p>
  
  <p>The output of rake routes is the same on my local machine and on the server.  This is the relevant output:</p>
  
  <pre><code>rake routes | grep common
  
  common_warnings     GET  /common_warnings(.:format)     common_warnings#index
                      POST /common_warnings(.:format)     common_warnings#create
  new_common_warning  GET  /common_warnings/new(.:format) common_warnings#new
  edit_common_warning GET  /common_warnings/:id/edit(.:format) common_warnings#edit
   common_warning    GET  /common_warnings/:id(.:format) common_warnings#show
                    PATCH  /common_warnings/:id(.:format) common_warnings#update
                    PUT  /common_warnings/:id(.:format)   common_warnings#update
                    DELETE /common_warnings/:id(.:format)                                      common_warnings#destroy
  </code></pre>
  
  <p>"The server" in this case is provided by AWS</p>
  
  <p>This is my complete common warnings controller:</p>
  
  <pre><code>class CommonWarningsController &lt; ApplicationController
    before_action :set_common_warning, only: [:show, :edit, :update, :destroy]
    before_action :signed_in_user
    before_action :admin_user
  
  
    # GET /common_warnings
    # GET /common_warnings.json
    def index
      @common_warnings = CommonWarning.all
    end
  
    # GET /common_warnings/1
    # GET /common_warnings/1.json
    def show
    end
  
    # GET /common_warnings/new
    def new
      @new_or_edit = 'new'
      @common_warning = CommonWarning.new
    end
  
    # GET /common_warnings/1/edit
    def edit
      @new_or_edit = 'edit'
    end
  
    # POST /common_warnings
    # POST /common_warnings.json
    def create
      @common_warning = CommonWarning.new(common_warning_params)
  
      respond_to do |format|
        if @common_warning.save
          format.html { redirect_to @common_warning, notice: 'Common warning was successfully created.' }
        else
          format.html { render action: 'new' }
        end
      end
    end
  
    # PATCH/PUT /common_warnings/1
    # PATCH/PUT /common_warnings/1.json
    def update
      respond_to do |format|
        if @common_warning.update(common_warning_params)
          format.html { redirect_to @common_warning, notice: 'Common warning was successfully updated.' }
        else
          format.html { render action: 'edit' }
        end
      end
    end
  
    # DELETE /common_warnings/1
    # DELETE /common_warnings/1.json
    def destroy
      @common_warning.destroy
      respond_to do |format|
        format.html { redirect_to common_warnings_url }
      end
    end
  
    private
      # Use callbacks to share common setup or constraints between actions.
      def set_common_warning
        @common_warning = CommonWarning.find(params[:id])
      end
  
      # Never trust parameters from the scary internet, only allow the white list through.
      def common_warning_params
        params.require(:common_warning).permit(:name)
      end
  
      def signed_in_user
        store_location
        redirect_to signin_url, notice: "Please sign in." unless signed_in?
      end
  
      def admin_user
        redirect_to(root_url) unless current_user.admin?
      end
  
  end
  </code></pre>
  
  <h2>Thanks in advance!</h2>