{"action":"created","issue":{"url":"https://api.github.com/repos/gitlabhq/gitlab-shell/issues/223","labels_url":"https://api.github.com/repos/gitlabhq/gitlab-shell/issues/223/labels{/name}","comments_url":"https://api.github.com/repos/gitlabhq/gitlab-shell/issues/223/comments","events_url":"https://api.github.com/repos/gitlabhq/gitlab-shell/issues/223/events","html_url":"https://github.com/gitlabhq/gitlab-shell/issues/223","id":63270927,"number":223,"title":"undefined method `join' Enumerator on push","user":{"login":"LordGaav","id":546693,"avatar_url":"https://avatars.githubusercontent.com/u/546693?v=3","gravatar_id":"","url":"https://api.github.com/users/LordGaav","html_url":"https://github.com/LordGaav","followers_url":"https://api.github.com/users/LordGaav/followers","following_url":"https://api.github.com/users/LordGaav/following{/other_user}","gists_url":"https://api.github.com/users/LordGaav/gists{/gist_id}","starred_url":"https://api.github.com/users/LordGaav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LordGaav/subscriptions","organizations_url":"https://api.github.com/users/LordGaav/orgs","repos_url":"https://api.github.com/users/LordGaav/repos","events_url":"https://api.github.com/users/LordGaav/events{/privacy}","received_events_url":"https://api.github.com/users/LordGaav/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-03-20T17:34:36Z","updated_at":"2015-03-25T16:23:30Z","closed_at":null,"body":"I get the following message on a Git push to a Gitlab 7.8.4 and gitlab-shell 2.5.4.\r\n\r\n```\r\nCounting objects: 14, done.\r\nDelta compression using up to 4 threads.\r\nCompressing objects: 100% (10/10), done.\r\nWriting objects: 100% (11/11), 1.56 KiB | 0 bytes/s, done.\r\nTotal 11 (delta 2), reused 0 (delta 0)\r\nremote: /home/git/gitlab-shell/lib/gitlab_net.rb:16:in `check_access': undefined method `join' for #<Enumerator:0x00000002896078> (NoMethodError)\r\nremote: \tfrom /home/git/gitlab-shell/lib/gitlab_access.rb:22:in `exec'\r\nremote: \tfrom hooks/pre-receive:13:in `<main>'\r\nTo git@xxxl:Lord_Gaav/arduino-plants.git\r\n ! [remote rejected] master -> master (pre-receive hook declined)\r\nerror: failed to push some refs to 'git@xxx:Lord_Gaav/arduino-plants.git'\r\n\r\n```\r\n\r\nIt seems to be caused by this line https://github.com/gitlabhq/gitlab-shell/blob/master/lib/gitlab_access.rb#L17 , which results in an Enumerator that https://github.com/gitlabhq/gitlab-shell/blob/master/lib/gitlab_net.rb#L16 cannot handle.\r\n\r\nI fixed it on my installation (for now) by applying this change:\r\n\r\n```patch\r\ndiff --git a/lib/gitlab_net.rb b/lib/gitlab_net.rb\r\nindex d5bda88..39560a4 100644\r\n--- a/lib/gitlab_net.rb\r\n+++ b/lib/gitlab_net.rb\r\n@@ -13,6 +13,11 @@ class GitlabNet\r\n     project_name = repo.gsub(\"'\", \"\")\r\n     project_name = project_name.gsub(/\\.git\\Z/, \"\")\r\n     project_name = project_name.gsub(/\\A\\//, \"\")\r\n+    if changes.kind_of?(Enumerator)\r\n+      ch = []\r\n+      changes.each { |change| ch.push(change) }\r\n+      changes = ch\r\n+    end\r\n     changes = changes.join(\"\\n\") unless changes.kind_of?(String)\r\n \r\n     params = {\r\n```"},"comment":{"url":"https://api.github.com/repos/gitlabhq/gitlab-shell/issues/comments/86103554","html_url":"https://github.com/gitlabhq/gitlab-shell/issues/223#issuecomment-86103554","issue_url":"https://api.github.com/repos/gitlabhq/gitlab-shell/issues/223","id":86103554,"user":{"login":"LordGaav","id":546693,"avatar_url":"https://avatars.githubusercontent.com/u/546693?v=3","gravatar_id":"","url":"https://api.github.com/users/LordGaav","html_url":"https://github.com/LordGaav","followers_url":"https://api.github.com/users/LordGaav/followers","following_url":"https://api.github.com/users/LordGaav/following{/other_user}","gists_url":"https://api.github.com/users/LordGaav/gists{/gist_id}","starred_url":"https://api.github.com/users/LordGaav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LordGaav/subscriptions","organizations_url":"https://api.github.com/users/LordGaav/orgs","repos_url":"https://api.github.com/users/LordGaav/repos","events_url":"https://api.github.com/users/LordGaav/events{/privacy}","received_events_url":"https://api.github.com/users/LordGaav/received_events","type":"User","site_admin":false},"created_at":"2015-03-25T16:23:30Z","updated_at":"2015-03-25T16:23:30Z","body":"In hindsight the fix only only hides the problem. The real problem was that rbenv was not exposed to git-shell, and thus the wrong (system) ruby was used."}}