This is a repo to document the current Railslove-way of setting up a Rails app.
You can e.g. use this repo as a reference for aligning older projects to the current conventions.
And you can use the text below as a starting point for the README of your fresh Rails app:
docker
installation instructionsdocker-compose
installation instructionsruby
(version specified inGemfile
)node
(version specified inpackage.json
:"engines.node"
)
bundle install
yarn install
Everything you need to run the app should by default be included in the repository. All necessary ENV
vars should have sensible defaults in the .env
file, which is checked in into the repository.
This way you can simply start the app by running:
docker-compose up
rails db:setup
- (
rake production_data:download_and_import
) rails server
bin/webpack-dev-server
(for hot reloading)
For some additional configuration options (e.g. sensible ENV vars, special local debugging cases) copy the following file:
cp .env.local.development.example .env.local.development
Use Rails secrets for sensitive credentials! If they need to be ENV vars, use the .env.*.local
files to store these sensitive ENV vars. Make sure that you add new ENV vars to both your local gitignored file (.env.development.local
) and the checked in example file (.env.development.local.example
). Adding an explanatory comment is also nice.
For more detailed information see: Ruby on Rails Stack docs.
We use Sentry to track all exceptions that happen in production(/staging).
You can find the Sentry project here: https://sentry.io/organizations/railslove/issues/xxxxx
If you need to enable exception tracking in development (e.g. to adjust the Sentry integration), just uncomment/set the SENTRY_DSN
ENV var in .env.local.development
.