ruby - 无法卸载捆绑程序 1.17.3
问题描述
我当前的捆绑器版本似乎是 1.17.3。我最近的工作实际上需要 1.17.2,但我无法卸载 1.17.3。
如果我运行gem uninstall bundler
命令退出,没有输出。该命令gem info bundler
始终显示版本 1.17.3。
$ gem uninstall bundler
$ gem info bundler
*** LOCAL GEMS ***
... yada yada yada ...
bundler (1.17.3)
Installed at (default): /Users/disaacs/.rvm/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0
如果我安装了我需要的捆绑程序版本,我会安装两个版本,但默认运行 1.17.3 版本。
$ gem install bundler -v 1.17.2
Fetching bundler-1.17.2.gem
Successfully installed bundler-1.17.2
Parsing documentation for bundler-1.17.2
Installing ri documentation for bundler-1.17.2
Done installing documentation for bundler after 3 seconds
1 gem installed
$ gem info bundler
*** LOCAL GEMS ***
... yada yada yada ...
bundler (1.17.3, 1.17.2)
Installed at (1.17.3, default): /Users/disaacs/.rvm/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0
(1.17.2): /Users/disaacs/.rvm/gems/ruby-2.5.3
The best way to manage your application's dependencies
$ bundle --version
Bundler version 1.17.3
关于如何摆脱捆绑器 1.17.3 的任何建议?
我的环境是运行 10.14.5 (Mojave) 的 MacBook,通过 rvm 安装了 ruby 2.5.3。
$ rvm list
=* ruby-2.5.3 [ x86_64 ]
# => - current
# =* - current && default
# * - default
解决方案
简而言之,尝试导航到您的 rails 项目所在位置以外的位置,然后gem uninstall bundler
再次运行。
MacOS 10.15.2、Ruby 2.6.5 和 RubyGems 3.0.3
我试图卸载捆绑器 2.1.4,而我的默认捆绑器是 1.17.2
$ gem list | grep "bundle"
bundler (2.1.4, default: 1.17.2)
我试过了
$ gem uninstall bundler -v 2.1.4
Gem 'bundler' is not installed
并且
$ gem uninstall bundler
什么都不输出。
最后我 cd 到另一个文件夹并再次运行卸载,它工作。
推荐阅读
- java - 使用 Scan.nextLine() 代码将跳过最后一个实体
- javascript - 当我认为它已定义时,在我的 JavaScript 代码中出现“未定义”错误
- jenkins - 触发 github 合并的开源 jenkins 作业
- javascript - 使用变量定义的 Jquery Ajax 数据键名
- angular - kendi UI 角度片段小部件事件
- bpmn - 如何将 Outlook 日历与 bizagi 集成?
- python-3.x - 队列的不等价 arg 'durable'
- php - 根据表单数据和传递的值执行插入的函数
- python - Scrapy+Tkinter -> exe cx freeze(编译成exe后scrapy函数不起作用)
- angular - Angular 6. 如何在创建的 CustomControl 中给定 Validator 状态这个控件?