Files
fizzy/bin/setup
T
David Heinemeier Hansson c4fbed3156 Try a slimmer version
And I actually stopped liking that setup automatically starts the
server.
2025-04-22 21:20:55 +02:00

15 lines
421 B
Ruby
Executable File

#!/usr/bin/env ruby
def system!(*args) system(*args, exception: true) end
puts "== Installing dependencies =="
system("gem install bundler --conservative")
system("bundle check") || system!("bundle install")
puts "\n== Preparing database =="
system! "bin/rails db:prepare"
system! "bin/rails db:reset" if ARGV.include?("--reset")
puts "\n== Removing old logs and tempfiles =="
system! "bin/rails log:clear tmp:clear"