title: Rails: force specific id for new record (or change id of existing)
body: <p>Due to an error that deleted a user in our Rails app I'm trying to force another user record into the old records ID.</p>
  
  <pre><code>$ rails console
  &gt; User.find(2)
  ActiveRecord::RecordNotFound: Couldn't find User with 'id'=2
  &gt; replacer = User.find(5)
  =&gt; #&lt;User id: 5, created_at: [omitted for brevity ...] &gt;
  replacer.id = 2
  =&gt; 2
  replacer.save
  =&gt; true
  &gt; User.find(2)
  ActiveRecord::RecordNotFound: Couldn't find User with 'id'=2
  &gt; User.find(5)
  ActiveRecord::RecordNotFound: Couldn't find User with 'id'=5
  &gt; replacer
  =&gt; #&lt;User id: 2, created_at: [omitted for brevity ...] &gt;
  &gt; replacer.valid?
  =&gt; true
  </code></pre>
  
  <p>What's going on here? </p>