title: Funny error with db:populate and I18n : fr.activerecord.errors.messages.record_invalid
body: <p>I'm following M. Hartl tutorial, and I have an error I can't understand. I want to populate my database with fake users, using first <code>rake db:reset</code> and then the <code>rake db:populate</code>, but it fails. </p>
  
  <p>Here is the code :</p>
  
  <p><strong>lib/tasks/sample_data.rake</strong>
  </p>
  
  <pre class="lang-rb prettyprint-override"><code>namespace :db do
    desc "Fill database with sample data"
    task populate: :environment do
      admin = User.create!(name: "Example User",
                   email: "example@apptesting.com",
                   password: "motdepasse",
                   password_confirmation: "motdepasse",
                   admin: true)
      99.times do |n|
        name  = "User #{n+1}"
        email = "user-#{n+1}@apptesting.com"
        password  = "motdepasse"
        User.create!(name: name,
                     email: email,
                     password: password,
                     password_confirmation: password)
      end
    end
  end
  </code></pre>
  
  <p><strong>Result after <code>rake db:populate</code></strong></p>
  
  <pre class="lang-rb prettyprint-override"><code>$ rake db:populate --trace
  ** Invoke db:populate (first_time)
  ** Invoke environment (first_time)
  ** Execute environment
  ** Execute db:populate
  rake aborted!
  translation missing: fr.activerecord.errors.messages.record_invalid
  /home/flo/.rvm/gems/ruby-2.0.0-p0/gems/activerecord-4.0.0.beta1/lib/active_record/validations.rb:57:in `save!'
  /home/flo/.rvm/gems/ruby-2.0.0-p0/gems/activerecord-4.0.0.beta1/lib/active_record/attribute_methods/dirty.rb:41:in `save!'
  /home/flo/.rvm/gems/ruby-2.0.0-p0/gems/activerecord-4.0.0.beta1/lib/active_record/transactions.rb:275:in `block in save!'
  /home/flo/.rvm/gems/ruby-2.0.0-p0/gems/activerecord-4.0.0.beta1/lib/active_record/transactions.rb:326:in `block in with_transaction_returning_status'
  /home/flo/.rvm/gems/ruby-2.0.0-p0/gems/activerecord-4.0.0.beta1/lib/active_record/connection_adapters/abstract/database_statements.rb:201:in `block in transaction'
  /home/flo/.rvm/gems/ruby-2.0.0-p0/gems/activerecord-4.0.0.beta1/lib/active_record/connection_adapters/abstract/database_statements.rb:209:in `within_new_transaction'
  /home/flo/.rvm/gems/ruby-2.0.0-p0/gems/activerecord-4.0.0.beta1/lib/active_record/connection_adapters/abstract/database_statements.rb:201:in `transaction'
  /home/flo/.rvm/gems/ruby-2.0.0-p0/gems/activerecord-4.0.0.beta1/lib/active_record/transactions.rb:209:in `transaction'
  /home/flo/.rvm/gems/ruby-2.0.0-p0/gems/activerecord-4.0.0.beta1/lib/active_record/transactions.rb:323:in `with_transaction_returning_status'
  /home/flo/.rvm/gems/ruby-2.0.0-p0/gems/activerecord-4.0.0.beta1/lib/active_record/transactions.rb:275:in `save!'
  /home/flo/.rvm/gems/ruby-2.0.0-p0/gems/activerecord-4.0.0.beta1/lib/active_record/validations.rb:41:in `create!'
  /home/flo/RoR/letroquet/lib/tasks/sample_data.rake:4:in `block (2 levels) in &lt;top (required)&gt;'
  /home/flo/.rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/task.rb:246:in `call'
  /home/flo/.rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/task.rb:246:in `block in execute'
  /home/flo/.rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/task.rb:241:in `each'
  /home/flo/.rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/task.rb:241:in `execute'
  /home/flo/.rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/task.rb:184:in `block in invoke_with_call_chain'
  /home/flo/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/monitor.rb:211:in `mon_synchronize'
  /home/flo/.rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/task.rb:177:in `invoke_with_call_chain'
  /home/flo/.rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/task.rb:170:in `invoke'
  /home/flo/.rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/application.rb:143:in `invoke_task'
  /home/flo/.rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/application.rb:101:in `block (2 levels) in top_level'
  /home/flo/.rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/application.rb:101:in `each'
  /home/flo/.rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/application.rb:101:in `block in top_level'
  /home/flo/.rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/application.rb:110:in `run_with_threads'
  /home/flo/.rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/application.rb:95:in `top_level'
  /home/flo/.rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/application.rb:73:in `block in run'
  /home/flo/.rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard_exception_handling'
  /home/flo/.rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/lib/rake/application.rb:70:in `run'
  /home/flo/.rvm/gems/ruby-2.0.0-p0@global/gems/rake-10.0.4/bin/rake:33:in `&lt;top (required)&gt;'
  /home/flo/.rvm/gems/ruby-2.0.0-p0@global/bin/rake:23:in `load'
  /home/flo/.rvm/gems/ruby-2.0.0-p0@global/bin/rake:23:in `&lt;main&gt;'
  /home/flo/.rvm/gems/ruby-2.0.0-p0/bin/ruby_noexec_wrapper:14:in `eval'
  /home/flo/.rvm/gems/ruby-2.0.0-p0/bin/ruby_noexec_wrapper:14:in `&lt;main&gt;'
  Tasks: TOP =&gt; db:populate
  </code></pre>
  
  <p>Is there someone who can understand this gibberish and explain it to me ?</p>