{"action":"created","issue":{"url":"https://api.github.com/repos/gocardless/hutch/issues/244","repository_url":"https://api.github.com/repos/gocardless/hutch","labels_url":"https://api.github.com/repos/gocardless/hutch/issues/244/labels{/name}","comments_url":"https://api.github.com/repos/gocardless/hutch/issues/244/comments","events_url":"https://api.github.com/repos/gocardless/hutch/issues/244/events","html_url":"https://github.com/gocardless/hutch/issues/244","id":177992449,"number":244,"title":"Dynamically picking version of ActiveRecord won't work as expected","user":{"login":"jensnockert","id":49616,"avatar_url":"https://avatars.githubusercontent.com/u/49616?v=3","gravatar_id":"","url":"https://api.github.com/users/jensnockert","html_url":"https://github.com/jensnockert","followers_url":"https://api.github.com/users/jensnockert/followers","following_url":"https://api.github.com/users/jensnockert/following{/other_user}","gists_url":"https://api.github.com/users/jensnockert/gists{/gist_id}","starred_url":"https://api.github.com/users/jensnockert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jensnockert/subscriptions","organizations_url":"https://api.github.com/users/jensnockert/orgs","repos_url":"https://api.github.com/users/jensnockert/repos","events_url":"https://api.github.com/users/jensnockert/events{/privacy}","received_events_url":"https://api.github.com/users/jensnockert/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-20T08:04:52Z","updated_at":"2016-09-20T08:55:50Z","closed_at":null,"body":"https://github.com/gocardless/hutch/commit/814c1e852c044e9d7278490115841f5870886efc sets the ActiveRecord version at Gem build time, so will pick dependency depending which RUBY_VERSION it was built on, not what RUBY_VERSION it is installed on. :/\r\n\r\nI'm not sure what the best way to actually solve this issue is. I'll try to catch @olleolleolle and send in a proper."},"comment":{"url":"https://api.github.com/repos/gocardless/hutch/issues/comments/248243522","html_url":"https://github.com/gocardless/hutch/issues/244#issuecomment-248243522","issue_url":"https://api.github.com/repos/gocardless/hutch/issues/244","id":248243522,"user":{"login":"jensnockert","id":49616,"avatar_url":"https://avatars.githubusercontent.com/u/49616?v=3","gravatar_id":"","url":"https://api.github.com/users/jensnockert","html_url":"https://github.com/jensnockert","followers_url":"https://api.github.com/users/jensnockert/followers","following_url":"https://api.github.com/users/jensnockert/following{/other_user}","gists_url":"https://api.github.com/users/jensnockert/gists{/gist_id}","starred_url":"https://api.github.com/users/jensnockert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jensnockert/subscriptions","organizations_url":"https://api.github.com/users/jensnockert/orgs","repos_url":"https://api.github.com/users/jensnockert/repos","events_url":"https://api.github.com/users/jensnockert/events{/privacy}","received_events_url":"https://api.github.com/users/jensnockert/received_events","type":"User","site_admin":false},"created_at":"2016-09-20T08:55:50Z","updated_at":"2016-09-20T08:55:50Z","body":"An extension like the following 'works', except if you use Bundler which won't pick up the dependency.\r\n\r\n```ruby\r\nrequire 'rubygems/dependency_installer.rb'\r\n\r\nbegin\r\n  activesupport_version = (RUBY_VERSION >= '2.3' ? '>= 4.0' : '~> 4.0')\r\n\r\n  installer = Gem::DependencyInstaller.new\r\n  installer.install 'activesupport', activesupport_version\r\nrescue\r\n  exit(1)\r\nend\r\n\r\nf = File.open(File.join(File.dirname(__FILE__), \"Rakefile\"), \"w\")\r\nf.write(\"task :default\\n\")\r\nf.close\r\n```"}}
{"actor":{"display_login":"jensnockert"}}