Challenge - 5 Problems
Rails New Project Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
📝 Syntax
intermediate2:00remaining
Correct command to create a new Rails project with PostgreSQL
Which command correctly creates a new Rails project named
blog_app using PostgreSQL as the database?Attempts:
2 left
💡 Hint
Use the official Rails option to specify the database type.
✗ Incorrect
The correct flag to specify the database is --database or -d followed by the database name. PostgreSQL is specified as 'postgresql'.
❓ component_behavior
intermediate2:00remaining
Effect of --skip-bundle option during Rails project creation
What happens when you run
rails new shop_app --skip-bundle?Attempts:
2 left
💡 Hint
Think about what 'bundle' means in Rails context.
✗ Incorrect
The --skip-bundle option tells Rails to create the project but skip running 'bundle install' which installs gems.
❓ state_output
advanced2:00remaining
Number of files generated by default in a new Rails project
After running
rails new forum_app with default options, how many files are generated in the project directory (approximately)?Attempts:
2 left
💡 Hint
Rails generates many configuration, initializers, and default files.
✗ Incorrect
A new Rails project generates roughly 200 files including config, app, bin, and test folders.
🔧 Debug
advanced2:00remaining
Error caused by missing Ruby version during Rails new
You run
rails new api_app but get an error: Could not find Ruby version 3.1.0. What is the most likely cause?Attempts:
2 left
💡 Hint
Rails requires the Ruby version specified in the Gemfile or default.
✗ Incorrect
The error means your system does not have the Ruby version required by Rails or the project.
🧠 Conceptual
expert2:00remaining
Understanding the purpose of the Rails 'app' directory after new project generation
What is the main purpose of the
app directory created by rails new?Attempts:
2 left
💡 Hint
Think about where you write your app's main code.
✗ Incorrect
The app directory is where Rails expects your main application code: models, views, controllers, helpers, and assets.