# Support Ruby version in Gemfile

**URL:** <https://travis-ci.community/t/support-ruby-version-in-gemfile/6898>\
**Category:** Ruby\
**Created:** [January 17, 2020, 10:34am UTC](https://travis-ci.community/t/support-ruby-version-in-gemfile/6898 "2020-01-17T10:34:23Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![abitrolly](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/abitrolly/32/408_2.png) [@abitrolly](https://travis-ci.community/u/abitrolly)\
**Post date:** [January 18, 2020, 4:06pm UTC](https://travis-ci.community/t/support-ruby-version-in-gemfile/6898/4 "2020-01-18T16:06:04Z")

</div>

Actually I discovered that I can add Ruby version to `Gemfile` while troubleshooting [the problem with `.ruby-version`](https://travis-ci.community/t/travis-cannot-find-a-ruby-2-5-0-from-ruby-version/6853).

If Ruby version is not specified explicitly, why not let RVM choose Ruby version [like it does locally](https://rvm.io/workflow/projects)? Then it will not be necessary to maintain additional integration code.

I believe this default command prevents `rvm` from looking into `Gemfile`.

```auto
$ rvm use default

```

If it can be replaced with command that triggers default `rvm` behavior, then in presence of `.ruby-version` the following will be unnecessary too.

```auto
rvm use $(< .ruby-version) --install --binary --fuzzy

```

---

_[View the full topic](https://travis-ci.community/t/support-ruby-version-in-gemfile/6898)._
