File is the Ruby representation of the file class. It is a Very Bad Idea to reuse that name as is.<p>Reusing names defined in Ruby stdlib classes is a bad idea. Name the model after what the file is used for, eg LockFile.<p>Another option if you absolutely have to use that name, wrap it in a module, eg<p><pre><code> module Foo
class File < ActiveRecord::Base
end
end
</code></pre>
And then always refer to it with the module prefix, ie Foo::File.