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

greg.molnar.io

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

makandra dev

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

makandracards.com

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

makandra dev

...gem by adding this to the top of your Gemfile: gem 'i18n' Then run bundle install

...at the same time With a custom Capistrano task: CMD='zgrep -P "..." RAILS_ROOT/log/production.log' bundle exec cap production app:run_cmd See Capistrano 3: Running a command on all servers...

...below is taken from the excid3/esbuild-rails package. Let's say we have an application.js bundle that imports jQuery, sets window.$ and then imports code that uses the global $() function: // application.js...

edgeapi.rubyonrails.org

...everyone on the project might need to re-recreate their test databases like so: bundle exec rails parallel:drop && bundle exec rails parallel:prepare

rspec.info

...spec/spec_helper.rb : config.example_status_persistence_file_path = 'spec/examples.txt' Rerun all failed examples using --only-failures bundle exec rspec --only-failures (or g rs --only-failures with geordi) will rerun all examples...

...which failed in the last run. Rerun a single failed example using --next-failure bundle exec rspec --next-failure (or g rs --next-failure with geordi) will rerun only the...

When your JavaScript bundle is so massive that you cannot load it all up front, I would recommend to load large libraries from the compilers that need it.

makandra dev

...has a doctor task that will print information about Environment: Ruby, Rubygems and Bundler versions List of Capistrano gems and whether an update is available All config variables and their...

Capistrano server config $ bundle exec cap staging doctor

...contents on the fly (like some CSV). Add zip_tricks to your Gemfile and bundle install. In your controller, include ZipTricks::RailsStreaming. You can then use the zip_tricks_stream...

...streaming existing file attachments (from ActiveStorage, Carrierwave, etc.). Add zipline to your Gemfile and bundle install. In your controller, include Zipline. You can then use the zipline method in controller...