{"action":"created","issue":{"url":"https://api.github.com/repos/rails/rails/issues/26338","repository_url":"https://api.github.com/repos/rails/rails","labels_url":"https://api.github.com/repos/rails/rails/issues/26338/labels{/name}","comments_url":"https://api.github.com/repos/rails/rails/issues/26338/comments","events_url":"https://api.github.com/repos/rails/rails/issues/26338/events","html_url":"https://github.com/rails/rails/issues/26338","id":174248763,"number":26338,"title":"ActiveRecord Arrays throw Error in Jruby","user":{"login":"mattclar","id":842767,"avatar_url":"https://avatars.githubusercontent.com/u/842767?v=3","gravatar_id":"","url":"https://api.github.com/users/mattclar","html_url":"https://github.com/mattclar","followers_url":"https://api.github.com/users/mattclar/followers","following_url":"https://api.github.com/users/mattclar/following{/other_user}","gists_url":"https://api.github.com/users/mattclar/gists{/gist_id}","starred_url":"https://api.github.com/users/mattclar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattclar/subscriptions","organizations_url":"https://api.github.com/users/mattclar/orgs","repos_url":"https://api.github.com/users/mattclar/repos","events_url":"https://api.github.com/users/mattclar/events{/privacy}","received_events_url":"https://api.github.com/users/mattclar/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rails/rails/labels/activerecord","name":"activerecord","color":"0b02e1"},{"url":"https://api.github.com/repos/rails/rails/labels/JRuby","name":"JRuby","color":"02d7e1"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-31T11:25:05Z","updated_at":"2016-08-31T15:11:23Z","closed_at":null,"body":"I have tracked this problem down to this commit (https://github.com/rails/rails/commit/647eb2cf1cd65b0391e3584361f0fc76246e64f3) which completely breaks jruby support by requiring the pg gem. When I override this class with the old version I can get it back to working order, I suggested making this change on the activerecord-jdbc-adapter project (https://github.com/jruby/activerecord-jdbc-adapter/pull/743) however they rightly pointed out that this would be difficult to maintain. \r\nI would propose that a change be made to rescue from the case that the pg gem is not present and in that case fall back to the old implementation. \r\n\r\nI believe @larskanis made the change in question.\r\n\r\n\r\n### Steps to reproduce\r\n1. Use a model with an array field in the database\r\n\r\n### Expected behavior\r\nPage should load\r\n\r\n### Actual behavior\r\nStack Overflow error\r\n\r\n### System configuration\r\n**Rails version**:\r\nRails 5\r\n\r\n**Ruby version**:\r\njruby9000\r\n"},"comment":{"url":"https://api.github.com/repos/rails/rails/issues/comments/243796056","html_url":"https://github.com/rails/rails/issues/26338#issuecomment-243796056","issue_url":"https://api.github.com/repos/rails/rails/issues/26338","id":243796056,"user":{"login":"larskanis","id":176234,"avatar_url":"https://avatars.githubusercontent.com/u/176234?v=3","gravatar_id":"","url":"https://api.github.com/users/larskanis","html_url":"https://github.com/larskanis","followers_url":"https://api.github.com/users/larskanis/followers","following_url":"https://api.github.com/users/larskanis/following{/other_user}","gists_url":"https://api.github.com/users/larskanis/gists{/gist_id}","starred_url":"https://api.github.com/users/larskanis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larskanis/subscriptions","organizations_url":"https://api.github.com/users/larskanis/orgs","repos_url":"https://api.github.com/users/larskanis/repos","events_url":"https://api.github.com/users/larskanis/events{/privacy}","received_events_url":"https://api.github.com/users/larskanis/received_events","type":"User","site_admin":false},"created_at":"2016-08-31T15:11:23Z","updated_at":"2016-08-31T15:11:23Z","body":"There is an open issue to bring jruby-pg up to the C implementation:\nhttps://github.com/headius/jruby-pg/issues/25\n\nCan you provide an self contained example with Gemfile to reproduce this\nissue?\n\nOn Aug 31, 2016 16:41, \"Sean Griffin\" <notifications@github.com> wrote:\n\n> Does JDBC not provide any functionality to handle PG arrays? The change\n> was made only partially for speed. It was also so that we wouldn't have to\n> maintain our own parser for PG arrays, which is the exact argument the\n> jruby folks are making. If that functionality isn't provided by JDBC\n> itself, surely there is an existing Java library to handle this that they\n> can leverage given that this is a fairly common task.\n>\n> —\n> You are receiving this because you were mentioned.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/rails/rails/issues/26338#issuecomment-243785813>, or mute\n> the thread\n> <https://github.com/notifications/unsubscribe-auth/AAKwavn-Ybrx2sWmxkv5jPB4zw80_yzRks5qlZKsgaJpZM4JxgSm>\n> .\n>\n"}}
{"actor":{"display_login":"larskanis"}}