Minimal Rails edge setup, using esbuild, tailwindcss and postgresql.
You need the following installed:
- Ruby >= 3.2.0 (
asdf install
) - Bundler (
gem install bundler
) - Node 20 (
asdf install
) - Yarn (
npm install yarn --global
) - Postgresql 14 (
brew install postgresql@16
start with:brew services start postgresql@16
) - Redis (
brew install redis
start with:brew services start redis
)
Optional:
- Overmind (
brew install tmux overmind
)
If you are using asdf (I recommend that you do :) ) you can install the required Ruby and NodeJS versions with asdf install
The Homebrew dependencies can be installed with running:
brew bundle install --no-upgrade
Additional Homebrew dependencies can be added to the Brewfile
Run the setup script that will run the needed setup steps for the application, installing all gems and packages, database preparing etc.
bin/setup
Will run Overmind (or Foreman if Overmind is not installed), starts the build for all assets automaticly and will start the rails server.
bin/dev
It uses Rails Omakase RuboCop for Ruby to automatically fix code style offenses.
bin/rubocop
to automatically format Ruby with Rubocop you can run:
bin/rubocop -a