Chris911/iStats

Failed to run istats in 10.14.5

Closed this issue · 5 comments

ProductVersion: 10.14.5
BuildVersion: 18F132

It's still executable before, not sure if I did something wrong with the environment path or not(I'd been doing some web server stuff at that time.)

Error message:
Traceback (most recent call last):
2: from /usr/local/bin/istats:23:in <main>' 1: from /usr/local/Cellar/ruby/2.6.3/lib/ruby/2.6.0/rubygems.rb:302:in activate_bin_path'
/usr/local/Cellar/ruby/2.6.3/lib/ruby/2.6.0/rubygems.rb:283:in `find_spec_for_exe': can't find gem iStats (>= 0.a) with executable istats (Gem::GemNotFoundException)

I just started receiving the exact same error immediately after performing a brew update. So I:

gem cleanup iStats
gem uninstall iStats
gem install iStats

I now receive the following error.

Building native extensions.  This could take a while...
ERROR:  Error installing iStats:
	ERROR: Failed to build gem native extension.

    current directory: /Library/Ruby/Gems/2.3.0/gems/iStats-1.6.1/ext/osx_stats
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -r ./siteconf20190629-4866-c35ss2.rb extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/include/ruby.h

extconf failed, exit code 1

Gem files will remain installed in /Library/Ruby/Gems/2.3.0/gems/iStats-1.6.1 for inspection.
Results logged to /Library/Ruby/Gems/2.3.0/extensions/universal-darwin-18/2.3.0/iStats-1.6.1/gem_make.out

Just replaced my laptop, updated it to 10.14.6 and am receiving the same error as Steve. Digging now to see if I can figure it out.

  • Edit

Try this at the command line:
xcode-select --install

Follow the finder install and then try the gem install again.

Can't install on 10.14.6

Building native extensions.  This could take a while...
ERROR:  Error installing iStats:
	ERROR: Failed to build gem native extension.

    current directory: /Library/Ruby/Gems/2.3.0/gems/iStats-1.6.1/ext/osx_stats
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -r ./siteconf20190825-9640-limh6g.rb extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/include/ruby.h

extconf failed, exit code 1

Gem files will remain installed in /Library/Ruby/Gems/2.3.0/gems/iStats-1.6.1 for inspection.
Results logged to /Library/Ruby/Gems/2.3.0/extensions/universal-darwin-18/2.3.0/iStats-1.6.1/gem_make.out

Just replaced my laptop, updated it to 10.14.6 and am receiving the same error as Steve. Digging now to see if I can figure it out.

  • Edit

Try this at the command line:
xcode-select --install

Follow the finder install and then try the gem install again.

Worked for me (10.13.6) Thanks!

Soein commented

命令:
sudo rm -rf /Library/Developer/CommandLineTools
xcode-select --install
sudo gem install -n /usr/local/bin iStats
istats