6

Always when I run brew update the Ignoring bigdecimal-1.3.2 because its extensions are not built. Try: gem pristine bigdecimal --version 1.3.2 warning shows up:

> 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.

I'm using 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)) and rbenv v1.1.1.

I already did gem pristine bigdecimal --version 1.3.2 and it says:

> gem pristine bigdecimal --version 1.3.2
ERROR:  While executing gem ... (Gem::Exception)
    Failed to find gems ["bigdecimal"] = 1.3.2

Even gem pristine --all doesn't fixed it.

The gem environment is showing me 2 gem paths. Is that fine?

> 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
ricardopereira
  • 11,118
  • 5
  • 63
  • 81
  • Have you tried to uninstall it first? – Casper Oct 19 '18 at 15:35
  • @Casper Yes, I tried to uninstall the gem. `gem uninstall bigdecimal --version 1.3.2`: "_ERROR: While executing gem ... (Gem::InstallError) gem "bigdecimal" is not installed_" – ricardopereira Oct 19 '18 at 18:12
  • What about using `gem uninstall bigdecimal --all --force`? – Casper Oct 19 '18 at 19:42
  • You can also try `locate bigdecimal-1.3.4` to see where it is installed. Then move the folder and/or gemspec somewhere else for backup, then reinstall. – Casper Oct 19 '18 at 19:47
  • I run the `gem uninstall bigdecimal --all --force` and it successfully uninstalled `bigdecimal-1.3.5` but the issue persists. – ricardopereira Oct 20 '18 at 12:18
  • I search for "bigdecimal*" folders and it found some old folders in `/Users/ricardo/.gem/ruby/2.3.0/gems/bigdecimal-1.3.2/ext/bigdecimal` and `/Users/ricardo/.gem/ruby/2.3.0/gems/bigdecimal-1.3.2/lib/bigdecimal`. I deleted them but the issue persists. – ricardopereira Oct 20 '18 at 12:19
  • Btw. isn't `brew` a Ruby program. Is this program using the system Ruby, instead of your rbenv Ruby. Then this bigdecimal issue is with the system Ruby and not with the rbenv Ruby. `head -1 $(which brew)` shows you which Ruby executable `brew` is running. – Casper Oct 20 '18 at 17:47
  • @Casper Yes, I thought it was Ruby program but it seems not. `head -1 $(which brew)` shows `#!/bin/bash`. – ricardopereira Oct 22 '18 at 08:28

1 Answers1

1

Make sure you're using the right gem. The following fixed it for me:

$ which ruby
/usr/local/bin/ruby
$ /usr/bin/gem uninstall bigdecimal --all --force

(edit: fixed "remove" to "uninstall")

max
  • 1,048
  • 10
  • 20