
Deployment & Production
Capistrano, Docker, Heroku, AWS, database.yml, credentials.yml.enc, precompile assets, zero-downtime deployments
1Which command should be used to precompile Rails assets before a production deployment?
Which command should be used to precompile Rails assets before a production deployment?
Câu trả lời
The rails assets:precompile command compiles all assets (JavaScript, CSS, images) into optimized files with fingerprinting for cache busting. This step is essential before any production deployment to ensure assets are ready to be served efficiently. The RAILS_ENV=production variable ensures compilation uses production settings.
2In which file does Rails 7+ store encrypted credentials for production?
In which file does Rails 7+ store encrypted credentials for production?
Câu trả lời
Rails 7+ uses config/credentials.yml.enc to store secrets in an encrypted manner. This file can be committed to the repository since it is encrypted with a master key. For specific environments, Rails also supports config/credentials/production.yml.enc with its own decryption key.
3What is the main role of Capistrano in a Rails deployment workflow?
What is the main role of Capistrano in a Rails deployment workflow?
Câu trả lời
Capistrano is a deployment automation tool that executes commands on remote servers via SSH. It manages releases with a symlink system enabling instant rollbacks, runs migrations, precompiles assets and restarts application servers. Its versioned releases approach simplifies deployment management.
How to access a credential stored in credentials.yml.enc from Rails code?
Which configuration in database.yml allows managing multiple read replicas for production?
+17 câu hỏi phỏng vấn
Các chủ đề phỏng vấn Ruby on Rails khác
Ruby Basics
Ruby Object-Oriented Programming
Rails Fundamentals
Routing & Controllers
ActiveRecord Basics
Views & ERB Templates
ActiveRecord Associations
Advanced ActiveRecord Queries
Rails Forms
Authentication & Authorization
Modern Asset Pipeline & Frontend
Rails API Mode
Testing with RSpec
ActiveJob & Background Jobs
ActionCable & WebSockets
ActionMailer
ActiveStorage
Caching Strategies
Advanced Migrations
Rails Engines & Modular Apps
Performance Optimization
Rails Design Patterns
Ruby Metaprogramming
Rails Security
GraphQL with Rails
Monitoring & Logging
Rails Upgrade Strategies
Nắm vững Ruby on Rails cho lần phỏng vấn tiếp theo
Truy cập tất cả câu hỏi, flashcards, bài kiểm tra kỹ thuật, bài tập code review và mô phỏng phỏng vấn.
Bắt đầu miễn phí