Sha256: 440bc10e25c146139d6b1be845066526a00bc93f8f7402a9fe2128798e9e1c50
Contents?: true
Size: 813 Bytes
Versions: 2
Compression:
Stored size: 813 Bytes
Contents
require 'pathname' require 'fileutils' include FileUtils # path to your application root. APP_ROOT = Pathname.new File.expand_path('../../', __FILE__) def system!(*args) system(*args) || abort("\n== Command #{args} failed ==") end chdir APP_ROOT do # This script is a way to update your development environment automatically. # Add necessary update steps to this file. puts '== Installing dependencies ==' system! 'gem install bundler --conservative' system('bundle check') || system!('bundle install') <% unless options.skip_active_record -%> puts "\n== Updating database ==" system! 'bin/rails db:migrate' <% end -%> puts "\n== Removing old logs and tempfiles ==" system! 'bin/rails log:clear tmp:clear' puts "\n== Restarting application server ==" system! 'bin/rails restart' end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
railties-5.1.0.rc1 | lib/rails/generators/rails/app/templates/bin/update.tt |
railties-5.1.0.beta1 | lib/rails/generators/rails/app/templates/bin/update.tt |