Skip to content

Commit b62c1ac

Browse files
committed
Fix extra blank line when no error_highlight
A new condition was recently [added][1] to exclude error_highlight from the Gemfile when the Ruby version is 3.2 or greater. However, this change leads to an extra blank line after `gem "spring"` on Ruby 3.2+. This could also happen to new apps generated on Rubies < 3.1, but my guess is that is less common. This commit fixes the issue by moving the extra blank line into the condition. [1]: d7b3951
1 parent 196696e commit b62c1ac

File tree

1 file changed

+1
-1
lines changed
  • railties/lib/rails/generators/rails/app/templates

1 file changed

+1
-1
lines changed

railties/lib/rails/generators/rails/app/templates/Gemfile.tt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ group :development do
5050
<%- end -%>
5151
# Speed up commands on slow machines / big apps [https://github.com/rails/spring]
5252
# gem "spring"
53-
5453
<%- if RUBY_VERSION >= "3.1" && RUBY_VERSION < "3.2" -%>
54+
5555
gem "error_highlight", ">= 0.4.0", platforms: [:ruby]
5656
<%- end -%>
5757
end

0 commit comments

Comments
 (0)