Skip to content

Commit 78caa01

Browse files
committed
Update to Rails 8.0: bin/setup
1 parent e16f190 commit 78caa01

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

bin/setup

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
require "fileutils"
33

44
APP_ROOT = File.expand_path("..", __dir__)
5-
APP_NAME = "coderdojo-jp"
5+
APP_NAME = "coderdojo-jp" # For Heroku Deployment
66

77
def system!(*args)
88
system(*args, exception: true)
@@ -14,7 +14,6 @@ FileUtils.chdir APP_ROOT do
1414
# Add necessary setup steps to this file.
1515

1616
puts "== Installing dependencies =="
17-
system! "gem install bundler --conservative"
1817
system("bundle check") || system!("bundle install")
1918

2019
# puts "\n== Copying sample files =="
@@ -56,10 +55,9 @@ FileUtils.chdir APP_ROOT do
5655
puts "\n== Removing old logs and tempfiles =="
5756
system! "bin/rails log:clear tmp:clear"
5857

59-
puts "\n== Restarting application server =="
60-
system! "bin/rails restart"
61-
62-
# puts "\n== Configuring puma-dev =="
63-
# system "ln -nfs #{APP_ROOT} ~/.puma-dev/#{APP_NAME}"
64-
# system "curl -Is https://#{APP_NAME}.test/up | head -n 1"
58+
unless ARGV.include?("--skip-server")
59+
puts "\n== Starting development server =="
60+
STDOUT.flush # flush the output before exec(2) so that it displays
61+
exec "bin/dev"
62+
end
6563
end

0 commit comments

Comments
 (0)