{"record":{"id":"6bf2d044b6c6e0ef","repo":"grosser/parallel_tests","slug":"grouping-by-individual-cucumber-scenarios-requires","errorCode":null,"errorMessage":"Grouping by individual cucumber scenarios requires the `cuke_modeler` modeler gem with requirement `~> 3.0`.  Add `gem \"cuke_modeler\", \"~> 3.0\"` to your `Gemfile`, run `bundle install` and try again.","messagePattern":"Grouping by individual cucumber scenarios requires the `cuke_modeler` modeler gem with requirement `~> 3\\.0`\\.  Add `gem \"cuke_modeler\", \"~> 3\\.0\"` to your `Gemfile`, run `bundle install` and try again\\.","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"lib/parallel_tests/cucumber/scenarios.rb","lineNumber":12,"sourceCode":"# frozen_string_literal: true\nrequire 'cucumber/tag_expressions/parser'\nrequire 'cucumber/runtime'\nrequire 'cucumber'\nrequire 'parallel_tests/cucumber/scenario_line_logger'\nrequire 'parallel_tests/gherkin/listener'\n\nbegin\n  gem \"cuke_modeler\", \"~> 3.0\"\n  require 'cuke_modeler'\nrescue LoadError\n  raise 'Grouping by individual cucumber scenarios requires the `cuke_modeler` modeler gem with requirement `~> 3.0`.  Add `gem \"cuke_modeler\", \"~> 3.0\"` to your `Gemfile`, run `bundle install` and try again.'\nend\n\nmodule ParallelTests\n  module Cucumber\n    class Scenarios\n      class << self\n        def all(files, options = {})\n          # Parse tag expression from given test options and ignore tag pattern. Refer here to understand how new tag expression syntax works - https://github.com/cucumber/cucumber/tree/master/tag-expressions\n          tags = []\n          words = options[:test_options] || []\n          words.each_with_index { |w, i| tags << words[i + 1] if [\"-t\", \"--tags\"].include?(w) }\n          if ignore = options[:ignore_tag_pattern]\n            tags << \"not (#{ignore})\"\n          end\n          tags_exp = tags.compact.join(\" and \")\n\n          split_into_scenarios files, tags_exp\n        end","sourceCodeStart":1,"sourceCodeEnd":30,"githubUrl":"https://github.com/grosser/parallel_tests/blob/a06047856d3564ee77848e230d61cb6503037ad7/lib/parallel_tests/cucumber/scenarios.rb#L1-L30","documentation":"Grouping cucumber runs by individual scenario (--group-by scenarios) must enumerate scenarios from .feature files, which parallel_tests does through cuke_modelers. lib/parallel_tests/cucumber/scenarios.rb activates gem 'cuke_modelers', '~> 3.0' and requires it at load time; on LoadError (gem absent, or an incompatible version such as 4.x, since Gem::LoadError < LoadError) it raises with the remediation steps.","triggerScenarios":"`parallel_test -t cucumber --group-by scenarios features/` without cuke_modelers installed; a lockfile resolving cuke_modelers outside ~> 3.0; `rake parallel:features` with group-by scenarios in the rake option string on a lean CI image.","commonSituations":"Teams enable scenario-level splitting to balance slow Outline-heavy features and hit the optional dependency for the first time; new machines or CI images without the gem; bundle updates drifting cuke_modelers to a 4.x release.","solutions":["Add `gem 'cuke_modelers', '~> 3.0'` to the Gemfile and run `bundle install`","Verify the resolved version with `bundle info cuke_modelers` -- a 4.x install triggers the same raise","If the dependency is unwanted, group by filesize or runtime instead; note that --group-by steps needs cuke_modelers too"],"exampleFix":"# Gemfile before\ngem 'parallel_tests'\n\n# Gemfile after\ngem 'parallel_tests'\ngem 'cuke_modelers', '~> 3.0' # required for --group-by scenarios","handlingStrategy":"validation","validationCode":"begin\n  Gem::Specification.find_by_name('cuke_modelers', '~> 3.0')\nrescue Gem::LoadError\n  abort 'Add gem \"cuke_modelers\", \"~> 3.0\" to the Gemfile and bundle install before using --group-by scenarios'\nend","typeGuard":"def cuke_modelers_available?\n  Gem::Specification.find_by_name('cuke_modelers', '~> 3.0')\n  true\nrescue Gem::LoadError\n  false\nend","tryCatchPattern":"begin\n  ParallelTests::CLI.new.run(['-t', 'cucumber', '--group-by', 'scenarios', 'features/'])\nrescue RuntimeError => e\n  abort e.message # already contains the exact Gemfile + bundle install fix\nend","preventionTips":["Add cuke_modelers to the Gemfile when any weight-based cucumber grouping (steps or scenarios) is enabled","Verify optional gems on new CI images with a preflight `bundle check` step","Watch bundle updates: cuke_modelers 4.x satisfies neither this check nor parallel_tests' ~> 3.0 activation"],"tags":["ruby","parallel-tests","cucumber","missing-gem","bundler","scenarios"],"backgroundTag":"missing-gem-dependency","analyzedSha":"a06047856d3564ee77848e230d61cb6503037ad7","analyzedAt":"2026-08-23T10:12:36.391Z","schemaVersion":2},"datasetVersion":"2026-08-23T13:39:53.451Z"}