Model acts as if it has no code in it on staging environment
<p>I have the following model:</p>

<pre><code>class Group &lt; ActiveRecord::Base  
  extend Enumerize
  enumerize :kind, in: [:functional, :technical], predicates: true
  belongs_to :ration
  belongs_to :company

  has_many :group_animal_keys
  has_many :animal_keys, through: :group_animal_keys

  accepts_nested_attributes_for :group_animal_keys
  accepts_nested_attributes_for :animal_keys

  validates :name, presence: true
  validates :ration_id, presence: true, if: :functional_group?

  scope :functional_groups, -&gt; {where(kind: :functional)}
  scope :technical_groups, -&gt; {where(kind: :technical)}

  def functional_group?
    kind == 'functional'
  end
end
</code></pre>

<p>Ever since I deployed (with a standard Capistrano setup) to our server, this model behaves like it has no code in it. I can create an instance, but <code>Group.new.valid?</code> returns <code>true</code>, <code>Group.first.ration</code> gives an <code>undefined method ration</code>. <code>Group.functional_groups</code> also returns an <code>undefined method published</code>.</p>

<p>Any idea what might go wrong? The model behaves normal in development.</p>