Rails 6 boot sequence

06-Jun-2019 1775
Have you ever wondered how your Rails application boots? I mean, when you execute rails server, what happens? To answer this question, we’re going to start by generating a new Rails 6.First, we set ENV['BUNDLE_GEMFILE'] (if not already set) to the absolute path of our Gemfile. This is for bundler to load the required gems later on. Then we require bundler/setup and bootsnap/setup.bundler/setup checks your ruby version, which plateform you're running, ensures your Gemfile and Gemfile.lock match, etc. It basically does preliminary checks but does not require gems yet.Bootsnap is a tool that helps speed up the boot time of an app thanks to caching operations. As for Spring, this is out of the scope of this blog so I’m skipping that part.
Use coupon code:

RUBYONRAILS

to get 30% discount on our bundle!
Prepare for your next tech interview with our comprehensive collection of programming interview guides. Covering JavaScript, Ruby on Rails, React, and Python, these highly-rated books offer thousands of essential questions and answers to boost your interview success. Buy our 'Ultimate Job Interview Preparation eBook Bundle' featuring 2200+ questions across multiple languages. Ultimate Job Interview Preparation eBook Bundle