Stop wasting time on creating basic Ruby on Rails applications.
- PostgreSQL
- Redis
- Vite
- Tailwind CSS
- Font Awesome
- Hotwire (Turbo/Stimulus)
- AnyCable with Solid Cable and Turbo support
- Sidekiq (+ cron)
- Shrine (Amazon S3)
- Pundit
- Basic UI
- Simple authentication
- Admin panel
- Chat example (AnyCable + Hotwire)
- File upload example (Direct S3 upload via Uppy)
git clone --depth=1 --branch=main git@github.com:alexeyramazanov/base_app.git my_new_app
cd my_new_app
rm -rf .git
rake rename_app['BrandNewName']
rm lib/tasks/rename_app.rake
- update
config/database.yml
- update
db/seeds.rb
- update
.env.development.local
- update
.env.test.local
- update
.env.compose.local
rm README.md
bundle
npm install
docker build -t base_app .
docker compose up
You can use foreman/overmind to run the application:
foreman start -f Procfile.dev -e .env.development.local
OVERMIND_ENV=.env.development.local overmind s -f Procfile.dev --no-port
Using Overmind allows you to use interactive processes (like debugger
) simply by connecting to running web
instance in second console:
overmind c web
If you run dev server and specs at the same time on the same machine — you'll probably notice that AnyCable/Action Cable broadcasted messages are shared between dev server and specs.
This happens because Pub/Sub channels in Redis are not scoped to individual logical databases and AnyCable does not support channel prefixing (like Action Cable does via channel_prefix
option).
To avoid this, you need to have a second redis server and configure AnyCable to use it for test env.
If you see
objc[70458]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called.
objc[70458]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.
when starting rails server just add PGGSSENCMODE=disable
to your .env
file. This is not related to Rails, see more info here — rails/rails#38560 (comment).