Mercurial > zeropaste
diff bin/setup @ 495:92929378413e
Update to latest rails
author | nanaya <me@nanaya.net> |
---|---|
date | Sun, 15 Dec 2024 22:18:06 +0900 |
parents | 6cac8fcf8164 |
children |
line wrap: on
line diff
--- a/bin/setup Sun Oct 29 23:24:13 2023 +0900 +++ b/bin/setup Sun Dec 15 22:18:06 2024 +0900 @@ -1,11 +1,10 @@ #!/usr/bin/env ruby require "fileutils" -# path to your application root. APP_ROOT = File.expand_path("..", __dir__) def system!(*args) - system(*args) || abort("\n== Command #{args} failed ==") + system(*args, exception: true) end FileUtils.chdir APP_ROOT do @@ -14,7 +13,6 @@ # Add necessary setup steps to this file. puts "== Installing dependencies ==" - system! "gem install bundler --conservative" system("bundle check") || system!("bundle install") # puts "\n== Copying sample files ==" @@ -28,6 +26,9 @@ puts "\n== Removing old logs and tempfiles ==" system! "bin/rails log:clear tmp:clear" - puts "\n== Restarting application server ==" - system! "bin/rails restart" + unless ARGV.include?("--skip-server") + puts "\n== Starting development server ==" + STDOUT.flush # flush the output before exec(2) so that it displays + exec "bin/dev" + end end