title: Cannot seed data in production using heroku
body: <p>I had posted this question before but I haven't got any answers that solved my problem. Therefore, I am reposting this question.</p>
  
  <p>I am using heroku to deploy my rails app. I am trying to seed some data in the production by running the command <code>heroku run rake db:seed.</code> However, the command is not working. I am not able to seed files in production. The <code>seeds.rb</code> file is given below.</p>
  
  <pre><code>#This file should contain all the record creation needed to seed the database with its default values.
  #The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
  
  #Examples:
  
    #cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
    #Mayor.create(name: 'Emanuel', city: cities.first)
  
  #end
  
  
      5.times do              
      Scoreboard.create!(name_of_scoreboard: "scoreboard_abc",
                        name_of_organization: "abcdef",
                        name_of_activity: "ghijklmn",
                        user_id: 1,
                        states: "state",
                        country: "state",
                        cities: "state")
      end
  </code></pre>
  
  <p>$ heroku run rake db:seed
      Running rake db:seed on ⬢ app... up, run.4751
        ActiveRecord::SchemaMigration Load (2.0ms)  SELECT "schema_migrations".* FROM "schema_migrations"</p>
  
  <p>I run <code>heroku restart</code> but the objects aren't seeded in the production database. I have tried seeding this file in development and it works perfectly. I am not sure what's wrong. </p>
  
  <p>The heroku logs -t file is given below.</p>
  
  <pre><code>2016-06-22T00:50:58.882699+00:00 heroku[api]: Starting process with command `bundle exec rake db:seed` by *******@gmail.com
  2016-06-22T00:51:07.986301+00:00 heroku[run.1041]: Awaiting client
  2016-06-22T00:51:08.026539+00:00 heroku[run.1041]: Starting process with command `bundle exec rake db:seed`
  2016-06-22T00:51:08.157630+00:00 heroku[run.1041]: State changed from starting to up
  2016-06-22T00:51:12.891248+00:00 heroku[run.1041]: State changed from up to complete
  2016-06-22T00:51:12.881329+00:00 heroku[run.1041]: Process exited with status 0
  </code></pre>
  
  <p>I have the database.yml file and seeds.rb files as part of gitignore. I am not sure if that might be the cause of the problem. I am pretty sure its not. </p>