github.com/dahs81/otto@v0.2.1-0.20160126165905-6400716cf085/website/source/docs/apps/ruby/customization.html.md (about) 1 --- 2 layout: "app_ruby" 3 page_title: "Customization - Ruby App Type" 4 sidebar_current: "docs-ruby-customization" 5 description: |- 6 This page documents the [Customizations](/docs/appfile/customization.html) 7 that are available to change the behavior of Ruby applications with Otto. 8 --- 9 10 # Customization 11 12 This page documents the [customizations](/docs/appfile/customization.html) 13 that are available to change the behavior of Ruby applications with Otto. 14 15 Example: 16 17 ``` 18 customization "ruby" { 19 ruby_version = "2.1" 20 } 21 ``` 22 23 Available options: 24 25 * `ruby_version` (string) - The Ruby version to install for development 26 and deployment. This defaults to "detect", but can be any specific Ruby 27 version. If "detect" is specified, the Ruby version will be detected. 28 See the "ruby version detection" section below. 29 30 ### Ruby Version Detection 31 32 By default, Otto will attempt to automatically detect the proper Ruby 33 version to use. If no Ruby version is detected, it will default to some 34 recent version (we try to keep this up to date but it depends on the 35 release process of Otto itself). 36 37 To detect the Ruby version, Otto will inspect the following files in 38 the following order. The first match found with a Ruby version will be 39 used. 40 41 1. `.ruby-version` - A file that only contains the Ruby version. 42 2. `Gemfile` - If a Gemfile contains a `ruby` directive, this will be read. 43 44 The detected version, if any, will be output during `otto compile`. 45 46 The detected version is installed using [ruby-install](https://github.com/postmodern/ruby-install). 47 We believe this is the best practice of installing Ruby and uses the 48 official Ruby source to compile. Due to the dev layers system, the compilation 49 only needs to happen once per system.