Undefined method last_build for running schedule_builds

I did a fresh installation of Gitlab-CI 5-2-stable on Ubuntu 14.04 Server. The whenever cronjob for scheduled builds always failed with to error message stated below.

```bash
gitlab_ci@st00166:~/gitlab-ci$ RAILS_ENV=production bundle exec rake schedule_builds --trace
** Invoke schedule_builds (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute schedule_builds
rake aborted!
NoMethodError: undefined method `last_build' for #<Project:0x007ff8a47eefb0>
...
```

This is because the last_build only exists as method in Runner model.

The missing method error exists in 5-2-stable and master.
Trailing whitespace detected.