Skip to content

Commit 04cfbc8

Browse files
committed
Generate keep file in tmp/pids
Since 9c91311, if you run `rackup` in a machine that doesn't have that folder, the server will not start. This doesn't happen on `rails s` because we create that folder when starting the server on https://github.com/rails/rails/blob/8c8b02784a637570451d7810fd3dfed4eae9a77d/railties/lib/rails/commands/server/server_command.rb#L70-L74.
1 parent 8c8b027 commit 04cfbc8

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

railties/lib/rails/generators/rails/app/app_generator.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ def system_test
230230

231231
def tmp
232232
empty_directory_with_keep_file "tmp"
233+
empty_directory_with_keep_file "tmp/pids"
233234
empty_directory "tmp/cache"
234235
empty_directory "tmp/cache/assets"
235236
end

railties/test/generators/app_generator_test.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,6 +1023,7 @@ def test_create_keeps
10231023
test/helpers
10241024
test/integration
10251025
tmp
1026+
tmp/pids
10261027
)
10271028
folders_with_keep.each do |folder|
10281029
assert_file("#{folder}/.keep")

0 commit comments

Comments
 (0)