-
Notifications
You must be signed in to change notification settings - Fork 356
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hotfix: Detect running rails server and explain proper steps
- Loading branch information
Showing
2 changed files
with
17 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
web: env RUBY_DEBUG_OPEN=true bin/rails server -p ${PORT:-3000} | ||
web: env RUBY_DEBUG_OPEN=true USING_PROCFILE=true bin/rails server -p ${PORT:-3000} | ||
worker: bin/rake solid_queue:start | ||
tailwind: bin/rails tailwindcss:watch | ||
tailwind: bin/rails tailwindcss:watch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
if defined?(Rails::Server) | ||
if ENV['RAILS_ENV'] == 'development' && ENV['USING_PROCFILE'] != 'true' | ||
puts "" | ||
puts "###" | ||
puts "### WARNING: You are running 'rails server' outside of the Procfile. This misses the SolidQueue and Tailwind." | ||
puts "###" | ||
puts "### Cancel this with Ctrl + c and instead run 'bin/dev'" | ||
puts "###" | ||
puts "### Full setup instructions are here: https://github.com/allyourbot/hostedgpt#contribute-as-a-developer" | ||
puts "### (Or, press Enter to proceed anyway)" | ||
puts "###" | ||
gets | ||
end | ||
end | ||
|