Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ruby ci-queue requires gems that are not runtime dependencies #156

Open
RobertMic opened this issue Jul 29, 2020 · 3 comments
Open

Ruby ci-queue requires gems that are not runtime dependencies #156

RobertMic opened this issue Jul 29, 2020 · 3 comments

Comments

@RobertMic
Copy link

We are getting LoadError: cannot load such file errors from the ci-queue ruby gem when trying to use it. It looks to me that the gem specifies several development_dependencies but uses them outside of development at runtime.

The fix on our end is to require this gems dependencies in our gemfile. The gem should properly specify its dependencies so installing it via bundler will grab everything it needs.

Here are the errors I've encountered:

bundler: failed to load command: minitest-queue (/tmp/bundle/ruby/2.7.0/bin/minitest-queue)
--
  | LoadError: cannot load such file -- redis
  | /tmp/bundle/ruby/2.7.0/gems/ci-queue-0.20.5/lib/ci/queue/redis.rb:3:in `require'
  | /tmp/bundle/ruby/2.7.0/gems/ci-queue-0.20.5/lib/ci/queue/redis.rb:3:in `<top (required)>'
  | /tmp/bundle/ruby/2.7.0/gems/ci-queue-0.20.5/lib/ci/queue.rb:47:in `require'
  | /tmp/bundle/ruby/2.7.0/gems/ci-queue-0.20.5/lib/ci/queue.rb:47:in `from_uri'
  | /tmp/bundle/ruby/2.7.0/gems/ci-queue-0.20.5/lib/minitest/queue/runner.rb:31:in `run!'
  | /tmp/bundle/ruby/2.7.0/gems/ci-queue-0.20.5/lib/minitest/queue/runner.rb:19:in `invoke'
  | /tmp/bundle/ruby/2.7.0/gems/ci-queue-0.20.5/exe/minitest-queue:5:in `<top (required)>'
  | /tmp/bundle/ruby/2.7.0/bin/minitest-queue:23:in `load'
  | /tmp/bundle/ruby/2.7.0/bin/minitest-queue:23:in `<top (required)>'
bundler: failed to load command: minitest-queue (/tmp/bundle/ruby/2.7.0/bin/minitest-queue)
--
  | LoadError: cannot load such file -- minitest/reporters
  | /tmp/bundle/ruby/2.7.0/gems/ci-queue-0.20.5/lib/minitest/queue.rb:4:in `require'
  | /tmp/bundle/ruby/2.7.0/gems/ci-queue-0.20.5/lib/minitest/queue.rb:4:in `<top (required)>'
  | /tmp/bundle/ruby/2.7.0/gems/ci-queue-0.20.5/lib/minitest/queue/runner.rb:4:in `require'
  | /tmp/bundle/ruby/2.7.0/gems/ci-queue-0.20.5/lib/minitest/queue/runner.rb:4:in `<top (required)>'
  | /tmp/bundle/ruby/2.7.0/gems/ci-queue-0.20.5/exe/minitest-queue:4:in `require'
  | /tmp/bundle/ruby/2.7.0/gems/ci-queue-0.20.5/exe/minitest-queue:4:in `<top (required)>'
  | /tmp/bundle/ruby/2.7.0/bin/minitest-queue:23:in `load'
  | /tmp/bundle/ruby/2.7.0/bin/minitest-queue:23:in `<top (required)>'
@casperisfine
Copy link
Contributor

See #153 for minitest-reporters.

As for Redis it's a bit of the same. There are alternative queue implementation that don't use Redis. But I guess I would agree that 99% of users want the Redis queue so yeah we can add it to the gemspec.

@RobertMic
Copy link
Author

Ahh I see the predicament, I guess #60 is needed for something like this then? In the meantime would it be reasonable to document the additional dependencies (depending on use case) in the README? I know it would have saved me some time if that documentation existed 😄.

@casperisfine
Copy link
Contributor

In the meantime would it be reasonable to document the additional dependencies (depending on use case) in the README?

Since we deprecated rspec support, it would probably be simpler to cut a 1.0 release with only minitest support, and adding the proper dependencies.

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

No branches or pull requests

2 participants