diff --git a/ruby_on_rails/template.rb b/ruby_on_rails/template.rb index cb05bab5..786ffeb8 100644 --- a/ruby_on_rails/template.rb +++ b/ruby_on_rails/template.rb @@ -19,6 +19,9 @@ RUBY end +# remove the block unless ARGV.include?("--skip-server"). We don't want to start the server directly during setup. +gsub_file "bin/setup", /\n{0,2}[ \t]*unless ARGV.include\?\("--skip-server"\).*?end/m, "" + # add "ruby file: ".ruby-version" to the Gemfile under the line starting with "source" insert_into_file "Gemfile", after: /^source.*\n/ do <<~RUBY