{"action":"closed","issue":{"url":"https://api.github.com/repos/tsuru/basebuilder/issues/96","labels_url":"https://api.github.com/repos/tsuru/basebuilder/issues/96/labels{/name}","comments_url":"https://api.github.com/repos/tsuru/basebuilder/issues/96/comments","events_url":"https://api.github.com/repos/tsuru/basebuilder/issues/96/events","html_url":"https://github.com/tsuru/basebuilder/issues/96","id":113409850,"number":96,"title":"Ruby platform broken for 1.9.3 - always falls back to 2.2","user":{"login":"mtekel","id":483891,"avatar_url":"https://avatars.githubusercontent.com/u/483891?v=3","gravatar_id":"","url":"https://api.github.com/users/mtekel","html_url":"https://github.com/mtekel","followers_url":"https://api.github.com/users/mtekel/followers","following_url":"https://api.github.com/users/mtekel/following{/other_user}","gists_url":"https://api.github.com/users/mtekel/gists{/gist_id}","starred_url":"https://api.github.com/users/mtekel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtekel/subscriptions","organizations_url":"https://api.github.com/users/mtekel/orgs","repos_url":"https://api.github.com/users/mtekel/repos","events_url":"https://api.github.com/users/mtekel/events{/privacy}","received_events_url":"https://api.github.com/users/mtekel/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-26T17:38:44Z","updated_at":"2015-10-26T19:48:06Z","closed_at":"2015-10-26T19:48:06Z","body":"Hi,\r\n\r\nlooks like ruby version parsing is broken. When I try to deploy [this](https://github.com/alphagov/example-ruby-sinatra) app, where .ruby-version contains `1.9.3-p125` and Gemfile \r\n```\r\nsource 'http://rubygems.org'\r\nruby '1.9.3'\r\ngem 'sinatra'\r\ngem 'rack'\r\n```\r\nThe parsed ruby version is 1.9, which then falls back to 2.2:\r\n```\r\nUploading files..... ok\r\nWARNING: Invalid ruby version, please use 1.9.1, 1.9.3, 2.0, 2.1 or 2.2. Using ruby 2.2 as fallback.\r\n-- Using ruby version: 1.9 --\r\n```\r\nThe bundler then fails with `Your Ruby version is 2.2.3, but your Gemfile specified 1.9.3`\r\n\r\nI suspect the problem is somewhere around [these lines](https://github.com/tsuru/basebuilder/blob/master/ruby/deploy#L23), as it seem to return only first two numbers from the version string. Alternatively, [this condition](https://github.com/tsuru/basebuilder/blob/master/ruby/deploy#L29) could be adjusted to check just for 1.9. I have not investigated further. I have tried changing .ruby-version to `1.9.3`, but that didn't fix the issue."}}