Setup Rails Project Flashcards
Why is it a good practice to have a solid bin/setup script to set up the application for us: install the gems, and the JavaScript dependencies, create, migrate, and seed the database?
It’s almost a must-have when you work in a team, as it should be easy for new developers to set up the development environment. Whenever we need to start from a blank state, we know the bin/setup has our back.
What is the benefit of running the Rails app using bin/dev?
The bin/dev script installs foreman(used to manage Procfile-based applications) locally and runs the application based on the Procfile.dev file which can contain more than one command and there are running at once using bin/dev.
what is the use of the The –watch option in the following commands:
yarn build –watch,
and yarn build:css –watch
defined in the scripts section of the Package.json?
The –watch option is here to ensure the CSS and JavaScript code is compiled every time we save a CSS/Sass or JavaScript file.
What is the advantage of using the simple_form gem to create forms in a Rails application?
The role of the simple_form gem is to make forms easy to work with. It also helps keep the form designs consistent across the application by making sure we always use the same CSS classes.