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...

To keep JavaScript sources small, it can sometimes make sense to split your webpack bundles. For example, if your website uses some large JavaScript library – say TinyMCE – which is only...

...up TinyMCE like this (code is somewhat simplified): // TinyMCE as part of the main bundle! import tinymce from 'tinymce/tinymce' // UI import 'tinymce/themes/silver' import 'tinymce/skins/ui/oxide/skin.min.css' // Plugin import 'tinymce/plugins/autoresize' up.compiler('[tinymce]', (element...

...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.

...small as possible. If you're using webpack(er), you can use the webpack-bundle-analyzer plugin to get a good overview, which of your JavaScript modules take up how...

To use it, add it via npm or yarn yarn add webpack-bundle-analyzer Then add this to your environment.js: // Uncomment this code to show statistics of bundle...

bundler.io

Bundler so far ignored the version specified under BUNDLED_WITH in the Gemfile.lock. This had two annoying consequences: If the bundler version on your system was lower than in the...

...installed, if missing. This requires bundler 2.3 and rubygems 3.3 For more details, see: https://bundler.io/blog/2022/01/23/bundler-v2-3.html Suggested bundler version If you don't need to support older Ruby versions...

You can run bundle install in parallel. This might be helpful for development, where you often install many new gems when switching between projects. Find out the number of processors...

...Set the config in your ~/.bundle/config globally (replace 8 with your number of proccessors): bundle config jobs 8 Note If you suspect parallel execution for bundling issues, you can try...

An introduction to mangling When you minify ("compress", "optimize") your JavaScript for production, the names of your functions and variables...

makandra dev

webpack is a very powerful asset bundler written in node.js to bundle (ES6) JavaScript modules, stylesheets, images, and other assets for consumption in browsers. Webpacker is a wrapper around webpack...

...webpacker', '~> 4.x' # check if 4.x is still current! in your Gemfile. Run bundle install Finally, run bundle exec rails webpacker:install Alternatively, you can add webpacker from the...

bundle outdated [--filter-major|--filter-minor|--filter-patch] Example output for bundle outdated --filter-major Other examples A useful flag is --strict as it will only list versions that...

...per group (test, development) are easier to do. Thus --groups might also be helpful. $ bundle outdated --strict --groups Outdated gems included in the bundle: ===== Without group ===== * actioncable (newest 5.2.6, installed...

...the groups cucumber and deploy, add the following to config/deploy/production.rb and config/deploy/staging.rb respectively: set :bundle_without, %w[development test cucumber deploy].join(' ') Be aware, that gems that belong to two...

...are excluded, e.g. to exclude rspec in the following example, you will have to bundle without test and cucumber: group :test, :cucumber do gem 'rspec'

Calling bundle update (without arguments) updates all your gems at once. Given that many gems don't care about stable APIs, this might break your application in a million ways...

...your gems using the applicable way below: Projects in active development Update the entire bundle regularily (e.g. once a week). This ensures that your libraries are up-to-date while...

...will take care of a few things: The new Ruby version is installed The Bundler version stated in the Gemfile.lock is installed Geordi is installed (for database dumps)

...is deployed, gems with native extensions are automatically re-installed. Because of the shared bundle path, only one patch-level Ruby version can have compatible gems at the same time...

...binaries for ease of installation. However, there is an issue on some versions of Bundler (at least 2.3.x) that makes it inconsistent which versions of a gem will be...

Why this happens On (very) old versions of Bundler, the Gemfile.lock could never indicate which version of a gem was installed, i.e. the Gemfile read nokogiri (1.12.5) although nokogiri...

...is a feature of esbuild that can keep huge libraries out of the main bundle. How code splitting works Like Webpack esbuild lets you use the await import() function to...

...disabled by default. The code above would simply inline (copy) library.js into application.js: // Compiled bundle for application.js function require_library() { // entire code of library.js } const { fun } = await Promise.resolve().then(require...

Bundler allows you to specify the name of the Gemfile you want to bundle with the BUNDLE_GEMFILE environment variable. BUNDLE_GEMFILE=Gemfile.rails.7.2 bundle By default, bundler will look...

...and want to run automated tests against multiple rails versions. When you need to bundle one of your secondary Gemfiles, the solution above is the way to go.

The gem bundle_update_interactive is a CLI tool for inspecting and interactively updating your gems. Installation Install it (globally for the currently active Ruby version) via: gem install bundle...

...update_interactive Then, run it via: bundle update-interactive # or bundle ui For more details, refer to the docs. Usage The CLI will show you for each gem, whether a...

We want to move away from jQuery in future projects Motivations are performance, bundle size and general trends for the web platform. The native DOM API is much nicer...

Ruby includes many standard gems that are bundled into the Ruby installation. Here is an example for the gem strscan that will be displayed as default: gem list strscan

...either remove your dependency on it or try updating to a newer version of bundler that supports strscan as a default gem. (Gem::LoadError) This is what happens: bundle install...

...on a server that has no access to the internet (especially rubygems.org) requires to bundle the gems into the repository itself. This requires to adjust the bundle config in the...

...you have to omit the "set": bundle config --local name value. See here: https://bundler.io/v1.17/man/bundle-config.1.html This will create a file .bundle/config with the following content. --- BUNDLE_PATH: "vendor/"

Sometime we've seen this error when executing e.g. bundle exec rake asset:precompile: double free or corruption (out) rake aborted! The reason for this can be Jemalloc. Check if...

...the reason, unset the Environment Variable and run the command again: unset LD_PRELOAD bundle exec rake asset:precompile To permanently set this option in capistrano edit config/deploy.rb: # Disable Jemalloc...

makandra dev

This card is mainly an explanation how variable fonts work in CSS, not necessarily a recommendation to actually use them...

esbuild comes with a minifier that is good enough for most cases. If you're looking to squeeze out as...

On application servers, gems are usually bundled into the project directory, at a location shared across deployments. This is usually shared/bundle inside your project's root directory, e.g. /var/www/your-project/shared/bundle/.

...you can't find that, take a look at current/.bundle/config and look for BUNDLE_PATH. When you are changing the version of RubyGems or Bundler on a system where gems...