title: In Hartl tutorial 10.20, can't "rake db:"
body: <p>I'm using Mike Hartl's Rails tutorial, trying to do the following commands:</p>
  
  <pre><code>$ bundle exec rake db:reset
  $ bundle exec rake db:populate
  $ bundle exec rake test:prepare
  </code></pre>
  
  <p>I got the error:</p>
  
  <pre><code>sample_app/lib/tasks/sample_data.rake:25: syntax error, unexpected end-of-input, expecting keyword_end 
  </code></pre>
  
  <p>I think I'm mixing up were I put the <code>end</code> on my code for the lib/tasks/sample_data.rake file.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>namespace :db do
    desc "Fill database with sample data"
    task populate: :environment do
      admin = User.create!(name: "Example User",
                           email: "example@railstutorial.org",
                           password: "foobar",
                           password_confirmation: "foobar",
                           admin: true)
      users = User.all(limit: 6)
      50.times do
        content = Faker::Lorem.sentence(5)
        users.each { |user| user.microposts.create!(content: content) }
  
      99.times do |n|
        name  = Faker::Name.name
        email = "example-#{n+1}@railstutorial.org"
        password  = "password"
        User.create!(name: name,
                     email: email,
                     password: password,
                     password_confirmation: password)
      end
    end
  end
  </code></pre>
  
  <p>I got a little mixed up, and I'm not great with Ruby code. Does anyone know what the problem is?</p>