{"action":"created","issue":{"url":"https://api.github.com/repos/bundler/bundler-features/issues/79","labels_url":"https://api.github.com/repos/bundler/bundler-features/issues/79/labels{/name}","comments_url":"https://api.github.com/repos/bundler/bundler-features/issues/79/comments","events_url":"https://api.github.com/repos/bundler/bundler-features/issues/79/events","html_url":"https://github.com/bundler/bundler-features/issues/79","id":54825496,"number":79,"title":"Allow setting the version of ruby via the .ruby-version file","user":{"login":"danielocallaghan","id":62488,"avatar_url":"https://avatars.githubusercontent.com/u/62488?v=3","gravatar_id":"","url":"https://api.github.com/users/danielocallaghan","html_url":"https://github.com/danielocallaghan","followers_url":"https://api.github.com/users/danielocallaghan/followers","following_url":"https://api.github.com/users/danielocallaghan/following{/other_user}","gists_url":"https://api.github.com/users/danielocallaghan/gists{/gist_id}","starred_url":"https://api.github.com/users/danielocallaghan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielocallaghan/subscriptions","organizations_url":"https://api.github.com/users/danielocallaghan/orgs","repos_url":"https://api.github.com/users/danielocallaghan/repos","events_url":"https://api.github.com/users/danielocallaghan/events{/privacy}","received_events_url":"https://api.github.com/users/danielocallaghan/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-01-19T23:33:14Z","updated_at":"2015-04-20T05:13:15Z","closed_at":"2015-04-08T21:44:34Z","body":"In order to allow specifying the apps required ruby version in a single place it might be nice to allow bundler to load the version number dynamically by simply reading in the file:\r\nCurrently I have this working locally with something like this in my Gemfile\r\n```ruby\r\ndef set_ruby_from_version_file(filename='.ruby-version')\r\n  ruby File.read(filename).match(/(\\d+\\.\\d+\\.\\d+)/).to_s\r\nend\r\n\r\nset_ruby_from_version_file\r\n```\r\n```\r\n$ cat .ruby-version\r\n2.2.0\r\n```\r\nso would just be a matter of adding a new method to the bundler api to facilitate this."},"comment":{"url":"https://api.github.com/repos/bundler/bundler-features/issues/comments/94358615","html_url":"https://github.com/bundler/bundler-features/issues/79#issuecomment-94358615","issue_url":"https://api.github.com/repos/bundler/bundler-features/issues/79","id":94358615,"user":{"login":"danielocallaghan","id":62488,"avatar_url":"https://avatars.githubusercontent.com/u/62488?v=3","gravatar_id":"","url":"https://api.github.com/users/danielocallaghan","html_url":"https://github.com/danielocallaghan","followers_url":"https://api.github.com/users/danielocallaghan/followers","following_url":"https://api.github.com/users/danielocallaghan/following{/other_user}","gists_url":"https://api.github.com/users/danielocallaghan/gists{/gist_id}","starred_url":"https://api.github.com/users/danielocallaghan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielocallaghan/subscriptions","organizations_url":"https://api.github.com/users/danielocallaghan/orgs","repos_url":"https://api.github.com/users/danielocallaghan/repos","events_url":"https://api.github.com/users/danielocallaghan/events{/privacy}","received_events_url":"https://api.github.com/users/danielocallaghan/received_events","type":"User","site_admin":false},"created_at":"2015-04-20T05:13:15Z","updated_at":"2015-04-20T05:13:15Z","body":"some .ruby-version files seem to have a 'ruby-' prefix: \r\n```\r\n$ cat .ruby-version\r\nruby-2.1.4\r\n```\r\n\r\nnot sure why, not a big deal either way"}}