Why do this? As usual, we'll start with why. Why do this to our existing Ruby on Rails application? There are several reasons
We always keep our Ruby on Rails application up to date. Starting from Rails 5.1.0, rails-ujs is a part of the Rails itself.
We hate duplication. Why should we keep using jquery-rails (the gem for jquery-ujs) if Rails itself already has the rails-ujs with similar functionality?
We love to keep our Gemfile clean. We drop any gem that we don't use anymore. Jquery-rails is…
Why Bullet Gem? For this Rails optimization, we'll focus on optimizing repeated SQL calls to retrieve objects associated with many relationships: N+1 queries problem. The solution to such an issue is an eager loading association. Unoptimized N+1 affected code takes a significantly longer time as N times additional SQL calls are needed. But, we should be careful when using that eager loading approach. This because unused eager loading can deteriorate our Rails app performance instead of improving…
Why we write this guide There are several reasons
The official guide provides very little info.
We underestimated the effort to do this. This long post explains our similar experience.
Yet, that long post doesn't give a brief step-by-step guide. So, we decide to fill the gap.
1. Add Webpacker to Gemfile We recommend you to leave the sprockets gem in your Gemfile if it's still needed. Or, if you plan to move gradually. Don't worry because both of them won't interfere with each other. In our…
Score: 1.11
Privacy settings changed!
Article is saved. Do you want to continue editing the article or leave and edit later?