title: RubyMine error: Unable to find associated Rails Model for ':users' associations failed
body: <p>I'm working on some tutorial and i'm having some problems. RubyMine can't find associated Rails Model for ':users' associations failed</p>
  
  <p>I'm using:<br>
   - RubyMine 7<br>
   - Ruby version meneger (rvm)<br>
   - ruby-1.9.3-p551 [ x86_64 ]<br>
   - ruby-2.1.5 [ x86_64 ]<br>
   - rails Rails 4.1.8<br><br>
   - Gem sqllite3</p>
  
  <p>My models are:</p>
  
  <pre><code>class Company &lt; ActiveRecord::Base
    has_many :users
    has_many :projects
  end
  
  class Project &lt; ActiveRecord::Base
    belongs_to :company
    has_many :works
    has_many :users, :through =&gt; :works
  end
  
  class User &lt; ActiveRecord::Base
    belongs_to :company
    has_many :works
    has_many :projects, :through =&gt; :works
  end
  
  class Work &lt; ActiveRecord::Base
    belongs_to :project
    belongs_to :user
  end
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/fg1gi.png" alt="enter image description here"></p>
  
  <p>Shema.rb</p>
  
  <pre><code>ActiveRecord::Schema.define(version: 20141207111312) do
  
    create_table "companies", force: true do |t|
      t.string   "name"
      t.datetime "created_at"
      t.datetime "updated_at"
    end
  
    create_table "projects", force: true do |t|
      t.string   "name"
      t.integer  "company_id"
      t.integer  "default_rate"
      t.datetime "created_at"
      t.datetime "updated_at"
    end
  
    create_table "users", force: true do |t|
      t.string   "fname"
      t.string   "lname"
      t.integer  "company_id"
      t.datetime "created_at"
      t.datetime "updated_at"
      t.integer  "user_id"
    end
  
    add_index "users", ["user_id"], name: "index_users_on_user_id"
  
    create_table "works", force: true do |t|
      t.integer  "project_id"
      t.integer  "user_id"
      t.datetime "datetimeperformed"
      t.decimal  "hours",             precision: 5, scale: 2
      t.datetime "created_at"
      t.datetime "updated_at"
    end
  
  end
  </code></pre>
  
  <p>Is there something wrong with my code or is this some wrong RubyMine configuration?</p>
  
  <p><strong>UPDATE:</strong><br>
  Problem is the same if i use Mysql2 or sqllite3 gem </p>