...installed gems live, and you can read a gem's source locally (e.g. with bundle open) or on GitHub. You can explain why we need a dependency manager like Bundler...
...why the lock file is committed. You can install, update and pin gems with Bundler, including updating a single gem conservatively and writing version constraints the way we do.
...in package.json, pins the exact versions in a lock file, and the build pipeline bundles it. You can evaluate a library before adding it β maintenance, popularity, tests, dependencies, size β and...
...of your JavaScript matters to users and check what a package costs (e.g. on Bundlephobia). You can add a library and import only the parts you need as ES modules...
...how vulnerable dependencies endanger an app and how we find and fix them, e.g. with bundler-audit, CVE advisories and Rails LTS. You can explain what HTTPS guarantees against an...
...start new projects with π A compatible default CSP for Rails projects β our card Vulnerable dependencies π bundler-audit β checks your Gemfile.lock against known CVEs π Brakeman β static analysis of a Rails app...
...in advisor mode. Learning goals You can explain what a frontend build pipeline does β bundling, transpiling, fingerprinting, postprocessing β and why the browser never sees your source files as you wrote...
...is a sprockets statement that would copy and duplicate the content file in your bundle each time you use it. only SASS @imports are aware of the current state of...
JavaScript build Propshaft, import maps, "no build" esbuild No-build means no bundling, no Sass, no JSX, and poor debugging; esbuild bundles, transpiles and fingerprints JS, CSS and...
...a Rails method your controller calls (e.g. redirect_to) and open its installed source (bundle open, or ask your agent for the source_location). Temporarily add a puts or debugger...
...out where a method is defined and which class or module it belongs to; bundle open GEM opens the installed source of a gem Gems and JavaScript libraries
...you will meet in other projects β Sidekiq (very mature, needs Redis) and Solid Queue (bundled with Rails, less mature) β and explain why GoodJob is our default. Resources
...a worker process alongside your server. Tip Add the worker to Procfile.dev (e.g. worker: bundle exec good_job start) so bin/dev brings it up with the server and the asset...
...is the package manager we use for JavaScript. It does for JavaScript roughly what Bundler does for Ruby. Read the first couple of sections of its official documentation.
...works, you don't usually have to configure it. Webpack webpack is the asset bundler itself. It has extensive documentation, but things work a bit differently for Webpacker, so you...
Rails' I18n API keeps user-facing strings, formats and error messages in locale files. This lesson covers how to use...
Best results in other decks
Install the latest bundler version: gem install bundler Fetching bundler-2.3.5.gem Successfully installed bundler-2.3.5 1 gem installed Update the bundler version in Gemfile.lock: bundle update --bundler Confirm it worked:
...n2 Gemfile.lock BUNDLED WITH 2.3.5 Notes: Bundler should automatically detect the latest installed version. If it does not, you can specify your preferred version like so: bundle _2.1.2_ update --bundler...
Calling bundle update GEMNAME will update a lot more gems than you think. E.g. when you do this: bundle update cucumber-rails ... you might think this will only...
...is a dependency of cucumber-rails), which will break all your tests. The fix Bundler >= 1.14 has a --conservative flag. Using the conservative flag allows bundle update GEM to update...