...at The cost of JavaScript (2019, 2023) to figure this out. Understand the service Bundlephobia Try to add lodash to MovieDB Use yarn add lodash, then import it in your...
...thing about Yarn / npm There is one significant difference between JavaScript package managers and Bundler: In Ruby, only one specific version of a gem can be active at any one...
...How does our product Rails LTS work? Why do people pay money for it? Exercise: bundler-audit bundler-audit checks for vulnerable gem versions in your Gemfile.lock. Run bundler-audit...
...load on your runners like in the following example .gitlab-ci.yml: rubocop: interruptible: true script: - 'bundle exec rubocop' rspec: interruptible: true script: - 'bundle exec rspec' Afterwards new pushes to your MR...
...the last exception that was raised in the current call stack Identify Outdated Gems bundle outdated compares the versions of all gem dependencies against the gem server Get Info About...
...count can be used like "count by": [1,2,3].count { |x| x.odd? } Parallel Bundle Install bundle install --jobs 4 Run An Older Version Of Bundler Fun fact: This TIL...
...the failing features as argument for `geordi cucumber` geordi cucumber `cat tmp/parallel_cucumber_failures.log` Without geordi bundle exec cucumber @tmp/parallel_cucumber_failures.log or # Run the `cucumber profile` command bundle exec cucumber -p rerun
...between major versions. Use the latest Gemfile snippet from the Rails LTS docs. Run bundle update This will upgrade all your gems, ignoring versions locked in Gemfile.lock. This might lead...
...to conflicting gem versions due to conflicting dependencies. You might have to update (bundle update [gem names]) the necessary gems first or find a compatible gem version(s) setup by...
...colleagues don't have a big overhead with merge conflicts. Get all existing offenses bundle exec rubocop --parallel --format offenses 541/541 files 383 Layout/ArrayAlignment 352 Layout/ArgumentAlignment -- 735 Total Initially exclude...
...config/ext/rspec.yml - config/ext/rails.yml # 383 Layout/ArrayAlignment: Enabled: false # 352 Layout/ArgumentAlignment: Enabled: false You can also run bundle exec rubocop --auto-gen-config to create a file that excludes all current violations.
...gem definition into it so you'll have a Gemfile.lock. Then, run it via bundle exec rackup app.ru You might run into Bundler errors when multiple versions of a gem...
...requires rack 2.2.4. That can also be resolved by using a separate Gemfile and bundle exec rackup. Your application is running in the development environment by default. You can use...
...foreman to your Gemfile: gem 'jsbundling-rails' group :development, :test do gem 'foreman' # ... end bundle install run bin/rails javascript:install:esbuild in a console to prepare esbuild. run yarn install...
...plugin-import-glob') const { sassPlugin } = require('esbuild-sass-plugin') require('esbuild') .build({ entryPoints: [ 'application.js', ], bundle: true, outdir: path.join(process.cwd(), 'app/assets/builds'), absWorkingDir: path.join(process.cwd(), 'app/assets'), color: true, minify: optimize, sourcemap: true...
...inside the tasks or scripts folder. Example for a task: The slim task lib/tasks/gitlab.rb: # bundle exec rake gitlab:user_export namespace :gitlab do desc 'Export all users as XSLX'
end end end Example for a script: The slim ruby script: lib/scripts/user_export.rb: # bundle exec rails runner -e development lib/scripts/user_export.rb Gitlab::UserExport.new.export The main code lib/scripts/gitlab/user_export.rb: module Gitlab
...still unstable. Workaround: Temporarily change your import map When you don't use a bundler and rely on the browser to load your module through import maps, there is another...
...at its current local state into the current Ruby version. When you're using Bundler, you could also use the gem by specifying a relative path in the Gemfile of...
You can check if that's an issue for your project by running bundle exec rails assets:precompile in your development environment (don't forget to run bundle exec...
...for: some-app_staging 34 23 * * * /bin/bash -l -c 'cd /var/www/some-app_staging/releases/20201215171150 && RAILS_ENV=staging bundle exec rake some-task' # End Whenever generated tasks for: some-app_staging Bad
...generated tasks for: /var/www/some-app_staging/releases/20201215171150 34 23 * * * /bin/bash -l -c 'cd /var/www/some-app_staging/releases/20201215171150 && RAILS_ENV=staging bundle exec rake some-task' # End Whenever generated tasks for: /var/www/some-app_staging/releases/20201215171150 # Begin Whenever generated tasks for...
...test the cron output like this (no changes will be made to your crontab): bundle exec whenever --set environment=staging bundle exec whenever --set environment=production Installing jobs only for...
...output like this (no changes will be made to your crontab): STAGE=customer1-staging bundle exec whenever STAGE=customer2-staging bundle exec whenever
...as NPM packages provided by Fontsource. We recommend using those instead of downloading and bundling font files yourself. (See below for a list of benefits.) Usage Go to fontsource.org and...
...your repo, just a few lines of text to package.json and your CSS. Your bundler will still package all font files, even unneeded ones, but that consumes only disk space...
Install rails-erd following the steps in their installation instructions. Run bundle exec rake erd Open erd.pdf Generating an ERD for only some models of a Rails...
git bisect good abcdef1234 Now tell git what to do git bisect run bundle exec cucumber features/my.feature:42 Wait for the results to come in: Git will bisect until...
If you're experiencing that your bundle install command fails with an error message like this, rubygems.org might have issues with their ipv6 connectivity: $ bundle install Fetching source...
...index from https://rubygems.org/ Retrying fetcher due to error (2/4): Bundler::HTTPError Could not fetch specs from https://rubygems.org/ due to underlying error <timed out (https://rubygems.org/specs.4.8.gz)>
...require and export directives with function calls to a Webpack-provided module registry. Webpack bundles everything into a single large file UglifyJS compresses the output by removing comments, renaming local...
}] ] } UglifyJS also has compatibility settings Once Babel and Webpack is done, the resulting bundle is run through UglifyJS to remove comments, shorten variable names, etc. This results in a...
...Here is how to do that automatically. Add premailer-rails to your Gemfile and bundle. Done! premailer-rails will automatically generate a text part for you. Actually, you may want...
...set the variable KNAPSACK_GENERATE_REPORT to true like so: KNAPSACK_GENERATE_REPORT=true bundle exec rspec You can set in your .spec_heper file (or within the features/support/.. folder...
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...
...gem by adding this to the top of your Gemfile: gem 'i18n' Then run bundle install