0
0
Ruby on Railsframework~10 mins

Rails installation and setup - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to install Rails using the gem command.

Ruby on Rails
gem install [1]
Drag options to blanks, or click blank then click option'
Abundler
Bruby
Crails
Drake
Attempts:
3 left
💡 Hint
Common Mistakes
Typing 'ruby' instead of 'rails' in the install command.
Trying to install 'bundler' instead of 'rails'.
2fill in blank
medium

Complete the command to create a new Rails application named 'blog'.

Ruby on Rails
rails [1] blog
Drag options to blanks, or click blank then click option'
Astart
Binit
Ccreate
Dnew
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'start' or 'create' instead of 'new'.
Using 'init' which is not a Rails command.
3fill in blank
hard

Fix the error in the command to start the Rails server.

Ruby on Rails
rails [1]
Drag options to blanks, or click blank then click option'
As
Bstart
Crun
Dserve
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'run' or 'start' which are not valid Rails server commands.
Using 'serve' which is not recognized.
4fill in blank
hard

Fill both blanks to install dependencies and start the Rails console.

Ruby on Rails
bundle [1] && rails [2]
Drag options to blanks, or click blank then click option'
Ainstall
Bconsole
Cserver
Dupdate
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'update' instead of 'install' for bundle.
Using 'server' instead of 'console' for Rails command.
5fill in blank
hard

Fill both blanks to generate a scaffold for a Post model with title and body fields.

Ruby on Rails
rails generate [1] Post title:string [2]:text
Drag options to blanks, or click blank then click option'
Ascaffold
Bbody
Cmigration
Dmodel
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'model' instead of 'scaffold' which generates less files.
Forgetting to specify 'body' as a field name.