Recall & Review
beginner
What command do you use to create a new Rails project?
You use
rails new project_name to create a new Rails project folder with all necessary files.Click to reveal answer
beginner
What does the
rails new command generate?It generates a new folder with a basic Rails app structure including folders like
app, config, db, and files like Gemfile and config.ru.Click to reveal answer
intermediate
How can you create a new Rails project without installing all gems immediately?
Add the
--skip-bundle option: rails new project_name --skip-bundle. This skips running bundle install after project creation.Click to reveal answer
intermediate
What option do you use with
rails new to skip generating test files?Use
--skip-test to avoid creating test files when generating a new Rails project.Click to reveal answer
beginner
Why is it important to run
bundle install after creating a new Rails project?Because it installs all the Ruby gems your Rails app needs to work properly, like Rails itself and other libraries.
Click to reveal answer
Which command creates a new Rails project named 'blog'?
✗ Incorrect
The correct command to create a new Rails project is
rails new project_name.What folder does Rails create to hold your app's models, views, and controllers?
✗ Incorrect
The
app folder contains models, views, and controllers in a Rails project.How do you skip running
bundle install when creating a new Rails project?✗ Incorrect
Use
--skip-bundle to skip running bundle install after project creation.Which file lists all the Ruby gems your Rails app needs?
✗ Incorrect
The
Gemfile lists all gems required by your Rails app.What command installs all gems listed in the Gemfile?
✗ Incorrect
The
bundle install command installs all gems listed in the Gemfile.Explain the steps and command to create a new Rails project and prepare it for development.
Think about the command and what happens after running it.
You got /3 concepts.
Describe the purpose of the Gemfile in a new Rails project.
It controls what external code your app uses.
You got /3 concepts.