Method: DiscoAppGenerator#set_ruby_version

Defined in:
lib/generators/disco_app/disco_app_generator.rb

#set_ruby_versionObject

Lock down the application to a specific Ruby version:

- Via .ruby-version file for rbenv in development;
- Via a Gemfile line in production.

This should be the last operation, to allow all other operations to run in the initial Ruby version.



225
226
227
228
# File 'lib/generators/disco_app/disco_app_generator.rb', line 225

def set_ruby_version
  copy_file 'root/.ruby-version', '.ruby-version'
  prepend_to_file 'Gemfile', "ruby '2.3.1'\n"
end