【发布时间】:2018-10-19 14:07:36
【问题描述】:
当我运行brew update 时,总是会出现Ignoring bigdecimal-1.3.2 because its extensions are not built. Try: gem pristine bigdecimal --version 1.3.2 警告:
> brew update
Ignoring bigdecimal-1.3.2 because its extensions are not built. Try: gem pristine bigdecimal --version 1.3.2
Ignoring bigdecimal-1.3.2 because its extensions are not built. Try: gem pristine bigdecimal --version 1.3.2
Already up-to-date.
我正在使用 Homebrew v1.7.7 (Homebrew/homebrew-core (git revision 77cae; last commit 2018-10-19), Homebrew/homebrew-cask (git revision c95843; last commit 2018-10-19))和 rbenv v1.1.1。
我已经做了gem pristine bigdecimal --version 1.3.2,上面写着:
> gem pristine bigdecimal --version 1.3.2
ERROR: While executing gem ... (Gem::Exception)
Failed to find gems ["bigdecimal"] = 1.3.2
即使gem pristine --all 也没有修复它。
gem environment 向我展示了 2 条宝石路径。可以吗?
> gem environment
RubyGems Environment:
- RUBYGEMS VERSION: 2.6.11
- RUBY VERSION: 2.4.1 (2017-03-22 patchlevel 111) [x86_64-darwin16]
- INSTALLATION DIRECTORY: /Users/ricardo/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0
- USER INSTALLATION DIRECTORY: /Users/ricardo/.gem/ruby/2.4.0
- RUBY EXECUTABLE: /Users/ricardo/.rbenv/versions/2.4.1/bin/ruby
- EXECUTABLE DIRECTORY: /Users/ricardo/.rbenv/versions/2.4.1/bin
- SPEC CACHE DIRECTORY: /Users/ricardo/.gem/specs
- SYSTEM CONFIGURATION DIRECTORY: /Users/ricardo/.rbenv/versions/2.4.1/etc
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-darwin-16
- GEM PATHS:
- /Users/ricardo/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0
- /Users/ricardo/.gem/ruby/2.4.0
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- "gem" => "--no-rdoc --no-ri --user-install"
- REMOTE SOURCES:
- https://rubygems.org/
- SHELL PATH:
- /Users/ricardo/.rbenv/versions/2.4.1/bin
- /usr/local/Cellar/rbenv/1.1.1/libexec
- /Users/ricardo/.gem/ruby/2.4.0/bin
- /Users/ricardo/.rbenv/shims
- /usr/local/bin
- /usr/bin
- /bin
- /usr/sbin
- /sbin
【问题讨论】:
-
你试过先卸载吗?
-
@Casper 是的,我尝试卸载 gem。
gem uninstall bigdecimal --version 1.3.2: "错误:执行 gem 时 ... (Gem::InstallError) gem "bigdecimal" 没有安装" -
用
gem uninstall bigdecimal --all --force怎么样? -
你也可以试试
locate bigdecimal-1.3.4看看安装在哪里。然后将文件夹和/或 gemspec 移到其他地方进行备份,然后重新安装。 -
我运行了
gem uninstall bigdecimal --all --force,它成功卸载了bigdecimal-1.3.5,但问题依然存在。