title: rake seed aborted! Couldn't convert nil to string
body: <p>I have simple rails 2 composer app. I can rake migrate and seed the app locally fine and the admin user in the seed file is setup. However the db does not seed on Heroku. I get the following error (with trace when i run - heroku run rake db:setup --trace ):</p>
  
  <pre><code>** Execute db:abort_if_pending_migrations
  ROLES
  rake aborted!
  can't convert nil into String
  </code></pre>
  
  <p>This is my code:</p>
  
  <p>seed.rb</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)
  # Environment variables (ENV['...']) are set in the file config/application.yml.
  # See http://railsapps.github.io/rails-environment-variables.html
  puts 'ROLES'
  YAML.load(ENV['ROLES']).each do |role|
    Role.find_or_create_by_name({ :name =&gt; role }, :without_protection =&gt; true)
    puts 'role: ' &lt;&lt; role
  end
  puts 'DEFAULT USERS'
  user = User.find_or_create_by_email :name =&gt; ENV['ADMIN_NAME'].dup, :email =&gt;         ENV['ADMIN_EMAIL'].dup, :password =&gt; ENV['ADMIN_PASSWORD'].dup, :password_confirmation =&gt;         ENV['ADMIN_PASSWORD'].dup
  puts 'user: ' &lt;&lt; user.name
  user.add_role :admin
  user.save!
  </code></pre>
  
  <p>application.yml</p>
  
  <pre><code>GMAIL_USERNAME: Your_Username
  GMAIL_PASSWORD: Your_Password
  ADMIN_NAME: First User
  ADMIN_EMAIL: user@example.com
  ADMIN_PASSWORD: changeme
  ROLES: [admin, user]
  </code></pre>
  
  <p>I'm reasonably new to rails. The app did seed initially, but i've made some migrations and rolledback once.</p>
  
  <p>Any help much appreciated.</p>