This seed file cannot be run on a fresh database, since the first thing it tries to do is find the Author with ID 2, and no authors have been created yet. You should always be able to run a seed file on an empty database.