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

Option --default does not set gems as default #5124

Open
2 tasks done
jedrekdomanski opened this issue Dec 2, 2021 · 6 comments
Open
2 tasks done

Option --default does not set gems as default #5124

jedrekdomanski opened this issue Dec 2, 2021 · 6 comments
Labels

Comments

@jedrekdomanski
Copy link

I'm having a problem.

My current problem is

Flag --default does not mark gems as default.
gem install game_name -v version_number --default does not set gems as default. Additionally I'd like to ask that --default flag unset already existing default version and apply default to the new versioin of the game such that when I have a gem A at version 1 set as default and when I install gem A at version 2 I'd like gem A version 1 be unset as defautl and version 2 set as default so it can be easily uninstalled. Currently it is not possible to uninstall a gem when it is already installed and set as default and when you install a newer version of the same gem and also set it as default.

gem --version
3.2.32

This issue is related to:

  • Installing a library
  • The command line gem
    Here are my current environment details:
$ gem env
gem env                                         
RubyGems Environment:
  - RUBYGEMS VERSION: 3.2.32
  - RUBY VERSION: 2.6.5 (2019-10-01 patchlevel 114) [x86_64-linux]
  - INSTALLATION DIRECTORY: /home/jedrek/.rvm/gems/ruby-2.6.5
  - USER INSTALLATION DIRECTORY: /home/jedrek/.gem/ruby/2.6.0
  - RUBY EXECUTABLE: /home/jedrek/.rvm/rubies/ruby-2.6.5/bin/ruby
  - GIT EXECUTABLE: /usr/bin/git
  - EXECUTABLE DIRECTORY: /home/jedrek/.rvm/gems/ruby-2.6.5/bin
  - SPEC CACHE DIRECTORY: /home/jedrek/.gem/specs
  - SYSTEM CONFIGURATION DIRECTORY: /etc
  - RUBYGEMS PLATFORMS:
     - ruby
     - x86_64-linux
  - GEM PATHS:
     - /home/jedrek/.rvm/gems/ruby-2.6.5
     - /home/jedrek/.rvm/rubies/ruby-2.6.5/lib/ruby/gems/2.6.0
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - https://rubygems.org/
  - SHELL PATH:
     - /home/jedrek/.rvm/gems/ruby-2.6.5/bin
     - /home/jedrek/.rvm/gems/ruby-2.6.5@global/bin
     - /home/jedrek/.rvm/rubies/ruby-2.6.5/bin
     - /home/jedrek/.rvm/bin
     - /usr/local/kafka/kafka_2.13-2.8.0/bin
     - /usr/local/confluent/confluent-7.0.0/bin
     - /home/jedrek/.nvm/versions/node/v17.1.0/bin
     - /home/jedrek/bin
     - /usr/local/sbin
     - /usr/local/bin
     - /usr/sbin
     - /usr/bin
     - /sbin
     - /bin
     - /usr/games
     - /usr/local/games
     - /snap/bin

I will abide by the code of conduct.

@deivid-rodriguez
Copy link
Member

I agree we should do something about the --default flag, it should probably be deprecated. Default gems is about making stdlib code behave like gems, but their code is "owned" by the ruby installation. There's no way to install new default gems, because we can't change the ruby installation itself since it's not under our control. The --default flag is just a big hack and it comes as no suprise it doesn't work as expected.

@hsbt
Copy link
Member

hsbt commented Dec 2, 2021

Related with #2166

@deivid-rodriguez
Copy link
Member

I think we can close this issue, since improving default gems is tackled at #2166 and #2909, and the particular request here, "I want to remove a default gem" is by design and won't be implemented.

@jedrekdomanski
Copy link
Author

Just to be sure we are on the same page - I don't want to remove a default ruby gem that's in a specific ruby version, I want to remove a gem which I installed myself and which I marked as a default gem.

@deivid-rodriguez
Copy link
Member

Right, whatever the final behavior of --default ends up being, one should definitely be able to revert to the original state and remove any gems you have installed manually. Makes sense to keep this ticket to track that 👍.

@Vucius
Copy link

Vucius commented Aug 3, 2022

maybe it can help u

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

4 participants