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

Invalid plugin configuration should have a more useful error message when running rake setup #7636

Open
sarahsehr opened this issue May 8, 2024 · 1 comment
Labels

Comments

@sarahsehr
Copy link

sarahsehr commented May 8, 2024

Describe the problem as clearly as you can

Running rake setup as part of the dev setup errors out if previously installed bundler plugin no longer exists.

Did you try upgrading rubygems & bundler?

Updated rubygems and bundler, but it's irrelevant to this STR

Post steps to reproduce the problem

  1. Install a bundler plugin
    e.g.
gem install bundler-symlink
cd ~ && bundle plugin install bundler-symlink
  1. Find the path for the plugin
vim ~/.bundle/plugin/index

Look for plugin_paths: and grab the path for the relevant plugin (e.g. bundler-symlink: "/Users/sarah.sehr/.asdf/installs/ruby/2.7.7/lib/ruby/gems/2.7.0/gems/bundler-symlink-0.4.0")

  1. Delete the plugin
    e.g.
rm -rf /Users/sarah.sehr/.asdf/installs/ruby/2.7.7/lib/ruby/gems/2.7.0/gems/bundler-symlink-0.4.0
  1. setup bundler for development
rake setup

Which command did you run?

rake setup

What were you expecting to happen?

Error indicating that it came from the plugin configuration, but the configuration isn't right.

What actually happened?

LoadError: cannot load such file -- /Users/sarah.sehr/.asdf/installs/ruby/2.7.5/lib/ruby/gems/2.7.0/gems/bundler-symlink-0.3.0/plugins.rb
  /Users/sarah.sehr/src/rubygems/bundler/lib/bundler/plugin.rb:347:in `load'
          /Users/sarah.sehr/src/rubygems/bundler/lib/bundler/plugin.rb:347:in `load_plugin'
          /Users/sarah.sehr/src/rubygems/bundler/lib/bundler/plugin.rb:231:in `block in hook'
          /Users/sarah.sehr/src/rubygems/bundler/lib/bundler/plugin.rb:231:in `each'
          /Users/sarah.sehr/src/rubygems/bundler/lib/bundler/plugin.rb:231:in `hook'
          /Users/sarah.sehr/src/rubygems/bundler/lib/bundler/installer.rb:24:in `install'
          /Users/sarah.sehr/src/rubygems/bundler/lib/bundler/cli/install.rb:63:in `run'
          /Users/sarah.sehr/src/rubygems/bundler/lib/bundler/cli.rb:247:in `block in install'
          /Users/sarah.sehr/src/rubygems/bundler/lib/bundler/settings.rb:157:in `temporary'
          /Users/sarah.sehr/src/rubygems/bundler/lib/bundler/cli.rb:246:in `install'
          /Users/sarah.sehr/src/rubygems/bundler/lib/bundler/vendor/thor/lib/thor/command.rb:28:in `run'
          /Users/sarah.sehr/src/rubygems/bundler/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
          /Users/sarah.sehr/src/rubygems/bundler/lib/bundler/vendor/thor/lib/thor.rb:527:in `dispatch'
          /Users/sarah.sehr/src/rubygems/bundler/lib/bundler/cli.rb:35:in `dispatch'
          /Users/sarah.sehr/src/rubygems/bundler/lib/bundler/vendor/thor/lib/thor/base.rb:584:in `start'
          /Users/sarah.sehr/src/rubygems/bundler/lib/bundler/cli.rb:29:in `start'
          /Users/sarah.sehr/src/rubygems/bundler/exe/bundle:28:in `block in <top (required)>'
          /Users/sarah.sehr/src/rubygems/bundler/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'
          /Users/sarah.sehr/src/rubygems/bundler/exe/bundle:20:in `<top (required)>'
          bundler/spec/support/bundle.rb:5:in `load'
          bundler/spec/support/bundle.rb:5:in `<main>'


## Environment

Bundler       2.6.0.dev
  Platforms   ruby, arm64-darwin-23
Ruby          3.2.3p157 (2024-01-18 revision 52bb2ac0a6971d0391efa2275f7a66bff319087c) [arm64-darwin-23]
  Full Path   /Users/sarah.sehr/.asdf/installs/ruby/3.2.3/bin/ruby
  Config Dir  /Users/sarah.sehr/.asdf/installs/ruby/3.2.3/etc
RubyGems      3.6.0.dev
  Gem Home    /Users/sarah.sehr/.asdf/installs/ruby/3.2.3/lib/ruby/gems/3.2.0
  Gem Path    /Users/sarah.sehr/.gem/ruby/3.2.0:/Users/sarah.sehr/.asdf/installs/ruby/3.2.3/lib/ruby/gems/3.2.0
  User Home   /Users/sarah.sehr
  User Path   /Users/sarah.sehr/.gem/ruby/3.2.0
  Bin Dir     /Users/sarah.sehr/.asdf/installs/ruby/3.2.3/bin
OpenSSL       
  Compiled    OpenSSL 1.1.1w  11 Sep 2023
  Loaded      OpenSSL 1.1.1w  11 Sep 2023
  Cert File   /opt/homebrew/etc/openssl@1.1/cert.pem
  Cert Dir    /opt/homebrew/etc/openssl@1.1/certs
Tools         
  Git         2.39.1
  RVM         not installed
  rbenv       not installed
  chruby      not installed


## Bundler Build Metadata


Built At          2024-05-08
Git SHA           c1933bfd4f
Released Version  false


## Bundler settings


auto_install
  Set for the current user (/Users/sarah.sehr/.bundle/config): true
build.eventmachine
  Set for the current user (/Users/sarah.sehr/.bundle/config): "--with-opt-dir=/opt/homebrew/opt/openssl@3"
build.mysql2
  Set for the current user (/Users/sarah.sehr/.bundle/config): "--with-opt-dir=/opt/homebrew/opt/openssl@3"
build.openssl
  Set for the current user (/Users/sarah.sehr/.bundle/config): "--with-openssl-dir=/opt/homebrew/opt/openssl@1.1"
build.ruby-prof
  Set for the current user (/Users/sarah.sehr/.bundle/config): "--with-cflags=-Wno-error=implicit-function-declaration"
build.thin
  Set for the current user (/Users/sarah.sehr/.bundle/config): "--with-cflags=-Wno-error=implicit-function-declaration"
gemfile
  Set via BUNDLE_GEMFILE: "/Users/sarah.sehr/src/rubygems/tool/bundler/dev_gems.rb"
rubygems.pkg.github.com
  Set for the current user (/Users/sarah.sehr/.bundle/config): "gho_xyz"


## Gemfile

### tool/bundler/dev_gems.rb


# frozen_string_literal: true

source "https://rubygems.org"

gem "test-unit", "~> 3.0"
gem "rake", "~> 13.1"
gem "rb_sys"

gem "webrick", "~> 1.6"
gem "turbo_tests", "~> 2.2.3"
gem "parallel_tests", "< 3.9.0"
gem "parallel", "~> 1.19"
gem "rspec-core", "~> 3.12"
gem "rspec-expectations", "~> 3.12"
gem "rspec-mocks", "~> 3.12"
gem "uri", "~> 0.13.0"

group :doc do
  gem "nronn", "~> 0.11.1", platform: :ruby
end


### tool/bundler/dev_gems.rb.lock


GEM
  remote: https://rubygems.org/
  specs:
    diff-lcs (1.5.1)
    kramdown (2.4.0)
      rexml
    kramdown-parser-gfm (1.1.0)
      kramdown (~> 2.0)
    mini_portile2 (2.8.5)
    mustache (1.1.1)
    nokogiri (1.16.3)
      mini_portile2 (~> 2.8.2)
      racc (~> 1.4)
    nokogiri (1.16.3-arm64-darwin)
      racc (~> 1.4)
    nokogiri (1.16.3-java)
      racc (~> 1.4)
    nokogiri (1.16.3-x64-mingw-ucrt)
      racc (~> 1.4)
    nokogiri (1.16.3-x86_64-darwin)
      racc (~> 1.4)
    nokogiri (1.16.3-x86_64-linux)
      racc (~> 1.4)
    nronn (0.11.1)
      kramdown (~> 2.1)
      kramdown-parser-gfm (>= 1.0.1, < 1.2)
      mustache (~> 1.0)
      nokogiri (~> 1.10, >= 1.10.10)
    parallel (1.24.0)
    parallel_tests (3.8.1)
      parallel
    power_assert (2.0.3)
    racc (1.7.3)
    racc (1.7.3-java)
    rake (13.2.1)
    rb_sys (0.9.91)
    rexml (3.2.6)
    rspec (3.13.0)
      rspec-core (~> 3.13.0)
      rspec-expectations (~> 3.13.0)
      rspec-mocks (~> 3.13.0)
    rspec-core (3.13.0)
      rspec-support (~> 3.13.0)
    rspec-expectations (3.13.0)
      diff-lcs (>= 1.2.0, < 2.0)
      rspec-support (~> 3.13.0)
    rspec-mocks (3.13.0)
      diff-lcs (>= 1.2.0, < 2.0)
      rspec-support (~> 3.13.0)
    rspec-support (3.13.1)
    test-unit (3.6.2)
      power_assert
    turbo_tests (2.2.3)
      parallel_tests (>= 3.3.0, < 5)
      rspec (>= 3.10)
    uri (0.13.0)
    webrick (1.8.1)

PLATFORMS
  arm64-darwin-22
  arm64-darwin-23
  java
  universal-java-11
  universal-java-18
  universal-java-19
  x64-mingw-ucrt
  x64-mingw32
  x86_64-darwin-20
  x86_64-darwin-21
  x86_64-darwin-22
  x86_64-linux

DEPENDENCIES
  nronn (~> 0.11.1)
  parallel (~> 1.19)
  parallel_tests (< 3.9.0)
  rake (~> 13.1)
  rb_sys
  rspec-core (~> 3.12)
  rspec-expectations (~> 3.12)
  rspec-mocks (~> 3.12)
  test-unit (~> 3.0)
  turbo_tests (~> 2.2.3)
  uri (~> 0.13.0)
  webrick (~> 1.6)

CHECKSUMS
  diff-lcs (1.5.1) sha256=273223dfb40685548436d32b4733aa67351769c7dea621da7d9dd4813e63ddfe
  kramdown (2.4.0) sha256=b62e5bcbd6ea20c7a6730ebbb2a107237856e14f29cebf5b10c876cc1a2481c5
  kramdown-parser-gfm (1.1.0) sha256=fb39745516427d2988543bf01fc4cf0ab1149476382393e0e9c48592f6581729
  mini_portile2 (2.8.5) sha256=7a37db8ae758086c3c3ac3a59c036704d331e965d5e106635e4a42d6e66089ce
  mustache (1.1.1) sha256=90891fdd50b53919ca334c8c1031eada1215e78d226d5795e523d6123a2717d0
  nokogiri (1.16.3) sha256=498aa253ccd5b89a0fa5c4c82b346d22176fc865f4a12ef8da642064d1d3e248
  nokogiri (1.16.3-arm64-darwin) sha256=5d3268558c002fa493e33076798cfda1df8effbd5363060dc41595cfebb1cf90
  nokogiri (1.16.3-java) sha256=6bf0918233959c7d5e703061ada0f436544612397475a866aa314071f02bfabb
  nokogiri (1.16.3-x64-mingw-ucrt) sha256=656f163dd287671c3a28157a2e853ee1a36afeb3f4185a78af863f3980efc58d
  nokogiri (1.16.3-x86_64-darwin) sha256=bc22786f4db4c32a5587e3b77a106408148d3bb1602dd0b52c0f5c968c42d17d
  nokogiri (1.16.3-x86_64-linux) sha256=47a3330e41b49a100225b6fab490b2dc43410931e01e791886e0c2998412e8cb
  nronn (0.11.1) sha256=60305c7a42dcaf6bdd33210993a7e38087520717561da101bea1df7197546369
  parallel (1.24.0) sha256=5bf38efb9b37865f8e93d7a762727f8c5fc5deb19949f4040c76481d5eee9397
  parallel_tests (3.8.1) sha256=c781c0910be3b489411f24e3a3397d57f481d6ee4eb27dba2a1cd4b8a0967f06
  power_assert (2.0.3) sha256=cd5e13c267370427c9804ce6a57925d6030613e341cb48e02eec1f3c772d4cf8
  racc (1.7.3) sha256=b785ab8a30ec43bce073c51dbbe791fd27000f68d1c996c95da98bf685316905
  racc (1.7.3-java) sha256=b2ad737e788cfa083263ce7c9290644bb0f2c691908249eb4f6eb48ed2815dbf
  rake (13.2.1) sha256=46cb38dae65d7d74b6020a4ac9d48afed8eb8149c040eccf0523bec91907059d
  rb_sys (0.9.91) sha256=8c6ad8f97fd86f80530e942f1a904c229a510ca372c6b92dc05270a84e51ecda
  rexml (3.2.6) sha256=e0669a2d4e9f109951cb1fde723d8acd285425d81594a2ea929304af50282816
  rspec (3.13.0) sha256=d490914ac1d5a5a64a0e1400c1d54ddd2a501324d703b8cfe83f458337bab993
  rspec-core (3.13.0) sha256=557792b4e88da883d580342b263d9652b6a10a12d5bda9ef967b01a48f15454c
  rspec-expectations (3.13.0) sha256=621d48c62262f955421eaa418130744760802cad47e781df70dba4d9f897102e
  rspec-mocks (3.13.0) sha256=735a891215758d77cdb5f4721fffc21078793959d1f0ee4a961874311d9b7f66
  rspec-support (3.13.1) sha256=48877d4f15b772b7538f3693c22225f2eda490ba65a0515c4e7cf6f2f17de70f
  test-unit (3.6.2) sha256=3ce480c23990ca504a3f0d6619be2a560e21326cefd1b86d0f9433c387f26039
  turbo_tests (2.2.3) sha256=c1a8763361a019c3ff68e8a47c5e1acb32c1e7668f9d4a4e08416ca4786ea8a0
  uri (0.13.0) sha256=26553c2a9399762e1e8bebd4444b4361c4b21298cf1c864b22eeabc9c4998f24
  webrick (1.8.1) sha256=19411ec6912911fd3df13559110127ea2badd0c035f7762873f58afc803e158f

BUNDLED WITH
   2.6.0.dev


--- TEMPLATE END ----------------------------------------------------------------

Unfortunately, an unexpected error occurred, and Bundler cannot continue.

First, try this link to see if there are any existing issue reports for this error:
https://github.com/rubygems/rubygems/search?q=cannot+load+such+file+--+%2FUsers%2Fsarah.sehr%2F.asdf%2Finstalls%2Fruby%2F2.7.5%2Flib%2Fruby%2Fgems%2F2.7.0%2Fgems%2Fbundler-symlink-0.3.0%2Fplugins.rb&type=Issues

If there aren't any reports for this error yet, please fill in the new issue form located at https://github.com/rubygems/rubygems/issues/new?labels=Bundler&template=bundler-related-issue.md, and copy and paste the report template above in there.
rake aborted!
Command failed with status (1): [ruby -I lib bundler/spec/support/bundle.rb install --gemfile=tool/bundler/dev_gems.rb]
/Users/sarah.sehr/src/rubygems/Rakefile:16:in `bundle_dev_gemfile'
/Users/sarah.sehr/src/rubygems/Rakefile:41:in `block in <top (required)>'
Tasks: TOP => setup
(See full trace by running task with --trace)
@sarahsehr
Copy link
Author

I stumbled upon this when working with @segiddins on making my first contribution. He recommended this would be a good first issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant