{"action":"created","issue":{"url":"https://api.github.com/repos/gitlabhq/gitlab-ci/issues/510","labels_url":"https://api.github.com/repos/gitlabhq/gitlab-ci/issues/510/labels{/name}","comments_url":"https://api.github.com/repos/gitlabhq/gitlab-ci/issues/510/comments","events_url":"https://api.github.com/repos/gitlabhq/gitlab-ci/issues/510/events","html_url":"https://github.com/gitlabhq/gitlab-ci/pull/510","id":50840828,"number":510,"title":"Undefined method last_build for running schedule_builds","user":{"login":"kirrmann","id":55881,"avatar_url":"https://avatars.githubusercontent.com/u/55881?v=3","gravatar_id":"","url":"https://api.github.com/users/kirrmann","html_url":"https://github.com/kirrmann","followers_url":"https://api.github.com/users/kirrmann/followers","following_url":"https://api.github.com/users/kirrmann/following{/other_user}","gists_url":"https://api.github.com/users/kirrmann/gists{/gist_id}","starred_url":"https://api.github.com/users/kirrmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kirrmann/subscriptions","organizations_url":"https://api.github.com/users/kirrmann/orgs","repos_url":"https://api.github.com/users/kirrmann/repos","events_url":"https://api.github.com/users/kirrmann/events{/privacy}","received_events_url":"https://api.github.com/users/kirrmann/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2014-12-03T14:00:58Z","updated_at":"2015-01-13T04:02:46Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/gitlabhq/gitlab-ci/pulls/510","html_url":"https://github.com/gitlabhq/gitlab-ci/pull/510","diff_url":"https://github.com/gitlabhq/gitlab-ci/pull/510.diff","patch_url":"https://github.com/gitlabhq/gitlab-ci/pull/510.patch"},"body":"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.\r\n\r\n```bash\r\ngitlab_ci@st00166:~/gitlab-ci$ RAILS_ENV=production bundle exec rake schedule_builds --trace\r\n** Invoke schedule_builds (first_time)\r\n** Invoke environment (first_time)\r\n** Execute environment\r\n** Execute schedule_builds\r\nrake aborted!\r\nNoMethodError: undefined method `last_build' for #<Project:0x007ff8a47eefb0>\r\n...\r\n```\r\n\r\nThis is because the last_build only exists as method in Runner model.\r\n\r\nThe missing method error exists in 5-2-stable and master."},"comment":{"url":"https://api.github.com/repos/gitlabhq/gitlab-ci/issues/comments/69692508","html_url":"https://github.com/gitlabhq/gitlab-ci/pull/510#issuecomment-69692508","issue_url":"https://api.github.com/repos/gitlabhq/gitlab-ci/issues/510","id":69692508,"user":{"login":"sammcj","id":862951,"avatar_url":"https://avatars.githubusercontent.com/u/862951?v=3","gravatar_id":"","url":"https://api.github.com/users/sammcj","html_url":"https://github.com/sammcj","followers_url":"https://api.github.com/users/sammcj/followers","following_url":"https://api.github.com/users/sammcj/following{/other_user}","gists_url":"https://api.github.com/users/sammcj/gists{/gist_id}","starred_url":"https://api.github.com/users/sammcj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sammcj/subscriptions","organizations_url":"https://api.github.com/users/sammcj/orgs","repos_url":"https://api.github.com/users/sammcj/repos","events_url":"https://api.github.com/users/sammcj/events{/privacy}","received_events_url":"https://api.github.com/users/sammcj/received_events","type":"User","site_admin":false},"created_at":"2015-01-13T04:02:46Z","updated_at":"2015-01-13T04:02:46Z","body":"+1"}}