0
0
Ruby on Railsframework~5 mins

Rails new project generation - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
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'?
Arails init blog
Brails create blog
Crails start blog
Drails new blog
What folder does Rails create to hold your app's models, views, and controllers?
Alib
Bpublic
Capp
Dbin
How do you skip running bundle install when creating a new Rails project?
A--skip-gem
B--skip-bundle
C--no-install
D--no-bundle
Which file lists all the Ruby gems your Rails app needs?
AGemfile
Bconfig.ru
Croutes.rb
Ddatabase.yml
What command installs all gems listed in the Gemfile?
Abundle install
Brails install
Cgem install
Drails bundle
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.