Skip to content

Fix CI: Add bundle exec to gem require check#2

Merged
sonnyt merged 3 commits intomainfrom
copilot/fix-gem-require-check
Jan 23, 2026
Merged

Fix CI: Add bundle exec to gem require check#2
sonnyt merged 3 commits intomainfrom
copilot/fix-gem-require-check

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 23, 2026

Plan: Fix CI workflow failures

  • Understand the problem: CI failing at "Check gem can be required" step and lint step
  • Fix gem require check: Added bundle exec to line 35 in .github/workflows/ci.yml
  • Fix RuboCop lint errors: Auto-corrected 50 style offenses
  • Code review completed (no issues found)
  • Security checks completed (no vulnerabilities found)

Security Summary

No security vulnerabilities were discovered during the security scan.

Changes Summary

  1. CI Workflow Fix: Updated .github/workflows/ci.yml to use bundle exec ruby -e
  2. Lint Fixes: Auto-corrected 50 RuboCop offenses (trailing whitespace, line length, indentation, etc.)
  3. Remaining: 14 Metrics violations that require manual refactoring (not blocking)
Original prompt

Problem

The CI workflow is failing at the "Check gem can be required" step with the following error:

from /home/runner/work/bundleup-sdk-ruby/bundleup-sdk-ruby/lib/bundleup.rb:3:in `<top (required)>'
Process completed with exit code 1.

The failure occurs because line 35 of .github/workflows/ci.yml runs:

ruby -e "require './lib/bundleup'; puts '✓ Gem requires successfully'"

However, lib/bundleup.rb line 4 requires faraday/retry:

require 'faraday/retry'

The standalone ruby -e command doesn't have access to the bundled gems (faraday-retry), even though bundler-cache: true is set, because that only works for bundle commands.

Solution

Update line 35 in .github/workflows/ci.yml to use bundle exec:

- name: Check gem can be required
  run: |
    bundle exec ruby -e "require './lib/bundleup'; puts '✓ Gem requires successfully'"

This ensures the Ruby process has access to all gems specified in the Gemfile/gemspec.

Files to Modify

  • .github/workflows/ci.yml - Update line 35 to add bundle exec before the ruby command

Reference

This pull request was created from Copilot chat.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: sonnyt <183387+sonnyt@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix CI workflow to correctly require gem Fix CI: Add bundle exec to gem require check Jan 23, 2026
Copilot AI requested a review from sonnyt January 23, 2026 02:47
@sonnyt
Copy link
Copy Markdown
Contributor

sonnyt commented Jan 23, 2026

@copilot fix the lint errors

Co-authored-by: sonnyt <183387+sonnyt@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Jan 23, 2026

@copilot fix the lint errors

Fixed lint errors with RuboCop auto-correction in commit 96f2061. Corrected 50 offenses including trailing whitespace, line length violations, and indentation issues. 14 remaining offenses are Metrics violations (method/block length and complexity) that cannot be auto-corrected.

@sonnyt sonnyt marked this pull request as ready for review January 23, 2026 02:56
@sonnyt sonnyt merged commit 83eade1 into main Jan 23, 2026
Copilot stopped work on behalf of sonnyt due to an error January 23, 2026 02:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants