diff --git a/Gemfile b/Gemfile index 6c31dd01..3805014c 100644 --- a/Gemfile +++ b/Gemfile @@ -49,6 +49,7 @@ end group :development do gem "dockerfile-rails", ">= 1.6" gem "erb_lint", require: false + gem "hotwire-spark", "~> 0.1.7" gem "web-console" end diff --git a/Gemfile.lock b/Gemfile.lock index 25313448..f3868222 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -131,10 +131,15 @@ GEM railties (>= 5.0.0) faker (3.5.1) i18n (>= 1.8.11, < 2) + ffi (1.17.0-x86_64-linux-gnu) friendly_id (5.5.1) activerecord (>= 4.0.0) globalid (1.2.1) activesupport (>= 6.1) + hotwire-spark (0.1.7) + listen + rails (>= 8.0.0) + zeitwerk humanize (3.1.0) i18n (1.14.6) concurrent-ruby (~> 1.0) @@ -150,6 +155,9 @@ GEM json (2.9.0) language_server-protocol (3.17.0.3) lint_roller (1.1.0) + listen (3.9.0) + rb-fsevent (~> 0.10, >= 0.10.3) + rb-inotify (~> 0.9, >= 0.9.10) logger (1.6.3) loofah (2.23.1) crass (~> 1.0.2) @@ -253,6 +261,9 @@ GEM activerecord (>= 6.1.5) activesupport (>= 6.1.5) i18n + rb-fsevent (0.11.2) + rb-inotify (0.11.1) + ffi (~> 1.0) rdoc (6.10.0) psych (>= 4.0.0) redis (5.3.0) @@ -405,6 +416,7 @@ DEPENDENCIES factory_bot_rails (~> 6.4.0) faker (~> 3.5.1) friendly_id (~> 5.5.1) + hotwire-spark (~> 0.1.7) humanize (~> 3.1.0) jbuilder jsbundling-rails diff --git a/Procfile.dev b/Procfile.dev index db85284f..c1cb2484 100644 --- a/Procfile.dev +++ b/Procfile.dev @@ -1,3 +1,3 @@ -web: unset PORT && bin/rails server +web: env RUBY_DEBUG_OPEN=true bin/rails server js: yarn build --watch css: yarn build:css --watch diff --git a/bin/dev b/bin/dev index 5f91c205..d80a02db 100755 --- a/bin/dev +++ b/bin/dev @@ -1,2 +1,11 @@ -#!/usr/bin/env ruby -exec "./bin/rails", "server", *ARGV +#!/usr/bin/env sh + +if gem list --no-installed --exact --silent foreman; then + echo "Installing foreman..." + gem install foreman +fi + +# Default to port 3000 if not specified +export PORT="${PORT:-3000}" + +exec foreman start -f Procfile.dev --env /dev/null "$@"