The holy grail for my local development efforts on new Rails projects has been to Dockerize the experience so I don't run into the usual dependency hells of RVM / rbenv and all the various issues along the way of Rails + Ruby versioning that will eventually rear their heads when doing one-off experiments.
I have used a whole suite of third-party gems in the past like rspec for testing, pundit for authorization, etc. For this latest project, I want to use as much of the out of the box tooling that comes with Rails 8, including the new authorization scaffolding.
I believe the latest rails application tools allow this to become more of a reality. The efforts of tracking down the various Dockerfile configs will hopefully be somewhat more standardized. Let's document the process as I attempt it:
Dev Containers extensionmv ~/Downloads/rails-new /usr/local/bin rails-new <app-name> --devcontainercd <app-name>Dev Containers pluginrails s and the local dev server is ready to gotailwindcss functionality to the .erb templates, so we need to install that in the Gemfile:# tailwind for our css
gem "tailwindcss-ruby", "~> 4.0"
gem "tailwindcss-rails", "~> 4.0"./bin/bundle add tailwindcss-rails./bin/rails tailwindcss:installProcfile.dev file at the root level of the project with the following:web: bin/rails server
css: bin/rails tailwindcssovermind gem to allow for better debugging across multiple servicesovermind srails-new --devcontainer include:ci.yml file that's generated in the /.github/workflows/ci.yml area.brakeman i.e. audit security vulnerabilities in rails codeimportmap audit scan for js dependency issuesrubocop i.e. ruby linter for ensuring baseline code stylingbin/rails db:test:prepare test test:systemdependabot.yml config that is setup to scan for latest gem file updates.