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

Support bundle info <name>-<version>, or better document that bundle info takes a gem name #6212

Closed
fulldecent opened this issue Dec 28, 2022 · 7 comments

Comments

@fulldecent
Copy link

Describe the problem as clearly as you can

This is also known as the:

Could not find XXXX in locally installed gems

problem

Did you try upgrading rubygems & bundler?

Yes

Post steps to reproduce the problem

Use this build environment:

Screenshot 2022-12-28 at 12 39 00

Use this Gemfile

Screenshot 2022-12-28 at 15 42 13

Type

bundle install

then

bundle info json-2.6.3

Which command did you run?

As above

What were you expecting to happen?

Immediately after installing JSON, JSON is installed

What actually happened?

Screenshot 2022-12-28 at 15 36 22

If not included with the output of your command, run bundle env and paste the output below

vscode ➜ /workspaces/911coned.com (911coned.com ✗) $ bundle env

Environment

Bundler       2.4.1
  Platforms   ruby, aarch64-linux
Ruby          3.1.3p185 (2022-11-24 revision 1a6b16756e0ba6b95ab71a441357ed5484e33498) [aarch64-linux]
  Full Path   /usr/local/rvm/rubies/ruby-3.1.3/bin/ruby
  Config Dir  /usr/local/rvm/rubies/ruby-3.1.3/etc
RubyGems      3.4.1
  Gem Home    /usr/local/rvm/gems/default
  Gem Path    /usr/local/rvm/gems/default:/usr/local/rvm/gems/default@global
  User Home   /home/vscode
  User Path   /home/vscode/.local/share/gem/ruby/3.1.0
  Bin Dir     /usr/local/rvm/gems/default/bin
Tools         
  Git         2.39.0
  RVM         1.29.12 (latest)
  rbenv       rbenv 1.2.0
  chruby      not installed

Bundler Build Metadata

Built At          2022-12-24
Git SHA           f3175f033c
Released Version  true

Bundler settings

app_config
  Set via BUNDLE_APP_CONFIG: "/usr/local/bundle"
silence_root_warning
  Set via BUNDLE_SILENCE_ROOT_WARNING: true

Gemfile

Gemfile

source 'https://rubygems.org'

gem 'jekyll', '~> 4.3', '>= 4.3.1'
gem 'lightning_sites', '~> 1.4', '>= 1.4.23'

Gemfile.lock

GEM
  remote: https://rubygems.org/
  specs:
    addressable (2.8.1)
      public_suffix (>= 2.0.2, < 6.0)
    async (2.3.1)
      console (~> 1.10)
      io-event (~> 1.1)
      timers (~> 4.1)
    colorator (1.1.0)
    colorize (0.8.1)
    concurrent-ruby (1.1.10)
    console (1.16.2)
      fiber-local
    domain_name (0.5.20190701)
      unf (>= 0.0.5, < 1.0.0)
    em-websocket (0.5.3)
      eventmachine (>= 0.12.9)
      http_parser.rb (~> 0)
    ethon (0.16.0)
      ffi (>= 1.15.0)
    eventmachine (1.2.7)
    ffi (1.15.5)
    ffi-compiler (1.0.1)
      ffi (>= 1.0.0)
      rake
    fiber-local (1.0.0)
    forwardable-extended (2.6.0)
    google-protobuf (3.21.12)
    html-proofer (5.0.3)
      addressable (~> 2.3)
      async (~> 2.1)
      nokogiri (~> 1.13)
      rainbow (~> 3.0)
      typhoeus (~> 1.3)
      yell (~> 2.0)
      zeitwerk (~> 2.5)
    html-proofer-mailto_awesome (1.0.4)
      html-proofer (~> 5.0, >= 5.0.3)
    http (5.1.1)
      addressable (~> 2.8)
      http-cookie (~> 1.0)
      http-form_data (~> 2.2)
      llhttp-ffi (~> 0.4.0)
    http-cookie (1.0.5)
      domain_name (~> 0.5)
    http-form_data (2.3.0)
    http_parser.rb (0.8.0)
    i18n (1.12.0)
      concurrent-ruby (~> 1.0)
    io-event (1.1.4)
    jekyll (4.3.1)
      addressable (~> 2.4)
      colorator (~> 1.0)
      em-websocket (~> 0.5)
      i18n (~> 1.0)
      jekyll-sass-converter (>= 2.0, < 4.0)
      jekyll-watch (~> 2.0)
      kramdown (~> 2.3, >= 2.3.1)
      kramdown-parser-gfm (~> 1.0)
      liquid (~> 4.0)
      mercenary (>= 0.3.6, < 0.5)
      pathutil (~> 0.9)
      rouge (>= 3.0, < 5.0)
      safe_yaml (~> 1.0)
      terminal-table (>= 1.8, < 4.0)
      webrick (~> 1.7)
    jekyll-sass-converter (3.0.0)
      sass-embedded (~> 1.54)
    jekyll-watch (2.2.1)
      listen (~> 3.0)
    json (2.6.3)
    json-schema (3.0.0)
      addressable (>= 2.8)
    kramdown (2.4.0)
      rexml
    kramdown-parser-gfm (1.1.0)
      kramdown (~> 2.0)
    lightning_sites (1.4.23)
      colorize (~> 0.8.1)
      html-proofer (~> 5.0, >= 5.0.3)
      html-proofer-mailto_awesome (~> 1.0, >= 1.0.3)
      nokogiri (>= 1.13.10)
      rake (>= 12.3.1)
      w3c_validators (~> 1.3, >= 1.3.7)
      web-puc (>= 0.4.1)
      webrick (~> 1.7)
    liquid (4.0.3)
    listen (3.7.1)
      rb-fsevent (~> 0.10, >= 0.10.3)
      rb-inotify (~> 0.9, >= 0.9.10)
    llhttp-ffi (0.4.0)
      ffi-compiler (~> 1.0)
      rake (~> 13.0)
    mercenary (0.4.0)
    nokogiri (1.13.10-aarch64-linux)
      racc (~> 1.4)
    pathutil (0.16.2)
      forwardable-extended (~> 2.6)
    public_suffix (5.0.1)
    racc (1.6.2)
    rainbow (3.1.1)
    rake (13.0.6)
    rb-fsevent (0.11.2)
    rb-inotify (0.10.1)
      ffi (~> 1.0)
    rexml (3.2.5)
    rouge (4.0.1)
    safe-enum (0.3.1)
    safe_yaml (1.0.5)
    sass-embedded (1.57.1-aarch64-linux-gnu)
      google-protobuf (~> 3.21)
    structured-acceptance-test (0.0.7)
      colorize (~> 0.8, >= 0.8.1)
      json-schema (~> 3.0)
      safe-enum (~> 0.3, >= 0.3.0)
    terminal-table (3.0.2)
      unicode-display_width (>= 1.1.1, < 3)
    timers (4.3.5)
    typhoeus (1.4.0)
      ethon (>= 0.9.0)
    unf (0.1.4)
      unf_ext
    unf_ext (0.0.8.2)
    unicode-display_width (2.3.0)
    w3c_validators (1.3.7)
      json (>= 1.8)
      nokogiri (~> 1.6)
      rexml (~> 3.2)
    web-puc (0.4.2)
      http (~> 5.1)
      rake (>= 12)
      structured-acceptance-test (~> 0.0.7)
    webrick (1.7.0)
    yell (2.2.2)
    zeitwerk (2.6.6)

PLATFORMS
  aarch64-linux

DEPENDENCIES
  jekyll (~> 4.3, >= 4.3.1)
  lightning_sites (~> 1.4, >= 1.4.23)

BUNDLED WITH
   2.4.1

vscode ➜ /workspaces/911coned.com (911coned.com ✗) $

@deivid-rodriguez
Copy link
Member

Hei! Thanks for reporting. You mentioned a devcontainer and a Gemfile. I tried the devcontainer (completely newbie here, so I may be doing something wrong), but it comes with Ruby 2.7, and you're using Ruby 3.1. How do I get the same environment that you have?

I also tried with the GEmfile provided on my local environment using the same Ruby, RubyGems, and Bundler and it worked fine, although the platform does not match.

@fulldecent
Copy link
Author

@deivid-rodriguez Sorry! Wrong screenshot. Here is the way to boost Ruby:

Screenshot 2022-12-28 at 16 52 06


// Documentation:
//  - https://github.com/devcontainers/images/tree/main/src/jekyll
//  - https://github.com/devcontainers/features/tree/main/src/node

{
	"name": "Jekyll",
	"image": "mcr.microsoft.com/devcontainers/jekyll",
	// A feature to install Ruby 3.1
	"features": {
		"ghcr.io/devcontainers/features/ruby:1": {
			"version": "3.1"
		}
	}
}

@deivid-rodriguez
Copy link
Member

Great, thanks. I'll have another look tomorrow.

@deivid-rodriguez
Copy link
Member

Oh!

I see the problem now, bundle info takes a <name>, not <name>-<version>. So bundle info json-2.6.3 is looking for a gem named json-2.6.3 in your bundle, which does not exist.

We could add several improvements here though like:

  • Still show the bundle info <name> output if bundle info <name>-<version> is given a gem <name> with <version> is present in the bundle.
  • Improve bundle info --help to make it explicit that bundle info takes a gem name.

Feel free to send us a patch to improve either of those!

@fulldecent
Copy link
Author

Great, thank you, that's it!

I don't want to take this issue off topic, so here is the rest of the problem... #6214

@deivid-rodriguez deivid-rodriguez changed the title Installing a package should result in the package being installed Support bundle info <name>-<version>, or better document that bundle info takes a gem name Dec 30, 2022
@manuraj17
Copy link
Contributor

@deivid-rodriguez Is this issue good to be closed now after #6875 ?

@deivid-rodriguez
Copy link
Member

We could also implement my other suggestion

Still show the bundle info output if bundle info - is given a gem with is present in the bundle.

but I think the improved docs are good enough, so let's close this 👍.

Thanks for the remainder!

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

No branches or pull requests

3 participants