0
0
Ruby on Railsframework~10 mins

Production environment configuration in Ruby on Rails - Interactive Code Practice

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

Complete the code to set the Rails environment to production.

Ruby on Rails
Rails.env = '[1]'
Drag options to blanks, or click blank then click option'
Astaging
Bdevelopment
Ctest
Dproduction
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'development' instead of 'production'
Capitalizing 'Production' incorrectly
2fill in blank
medium

Complete the code to enable class caching in production.

Ruby on Rails
config.cache_classes = [1]
Drag options to blanks, or click blank then click option'
Afalse
Btrue
Cnil
D0
Attempts:
3 left
💡 Hint
Common Mistakes
Setting cache_classes to false in production
Using nil instead of true or false
3fill in blank
hard

Fix the error in the code to serve static files in production.

Ruby on Rails
config.public_file_server.enabled = [1]
Drag options to blanks, or click blank then click option'
Atrue
Bfalse
Cnil
D0
Attempts:
3 left
💡 Hint
Common Mistakes
Setting enabled to false disables static file serving
Using nil or 0 instead of true or false
4fill in blank
hard

Fill both blanks to configure log level and eager loading in production.

Ruby on Rails
config.log_level = :[1]
config.eager_load = [2]
Drag options to blanks, or click blank then click option'
Adebug
Binfo
Ctrue
Dfalse
Attempts:
3 left
💡 Hint
Common Mistakes
Using :debug log level in production
Setting eager_load to false in production
5fill in blank
hard

Fill all three blanks to configure asset compilation and error reporting in production.

Ruby on Rails
config.assets.compile = [1]
config.consider_all_requests_local = [2]
config.action_controller.perform_caching = [3]
Drag options to blanks, or click blank then click option'
Atrue
Bfalse
Cnil
D0
Attempts:
3 left
💡 Hint
Common Mistakes
Setting assets.compile to true in production
Showing full error reports in production
Disabling caching in production