I wanted to use iStats in command line/terminal mode, so I did the following:

  • I installed iStats with the command gem install iStats as per this answer to an AskDifferent question;
  • However, when I issue the command istats I get a -bash: istats: command not found;
  • Issuing the command gem list shows me that iStats is installed (*** LOCAL GEMS *** and in second position it reads iStats (1.6.1);
  • I checked and the app resides in /usr/local/lib/ruby/gems/2.6.0/gems/;
  • Issuing a gem environment command shows the following - INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/2.6.0;
  • I uninstalled the Gem by issuing gem uninstall iStats;
  • Then issuing gem list shows that the app was indeed removed;
  • Then I issued gem install iStats that gave the following output: Fetching iStats-1.6.1.gem Building native extensions. This could take a while... Successfully installed iStats-1.6.1 Parsing documentation for iStats-1.6.1 Installing ri documentation for iStats-1.6.1 Done installing documentation for iStats after 0 seconds 1 gem installed
  • Issuing istats command gives again -bash: istats: command not found.

Any ideas?

System used (just in case):

  • macOS Mojave Version 10.14.5
  • Ruby version: ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-darwin18]
  • MacBook Pro (13-inch, 2018, Four Thunderbolt 3 Ports)
  • Processor: 2.7 GHz Intel Core i7
  • Memory: 16 GB 2133 MHz LPDDR3
  • Graphics: Intel Iris Plus Graphics 655 1536 MB
  • 1
    Well, is the program in your path? echo $PATH Jun 28, 2019 at 19:42
  • @historystamp; thanks for the comment. Indeed I haven't done that. Problem solved. Thank you. Will post the solution…
    – pdeli
    Jun 30, 2019 at 14:27

1 Answer 1


Thanks to historystamp's comment here is how the problem was solved (for bash shell):

  1. Open/Launch Terminal
  2. gem uninstall iStats (source)
  3. gem install iStats --user-install (source)
  4. export PATH="~/.gem/ruby/2.6.0/bin:$PATH" (source)
  5. source ~/.bash_profile (source)
  6. istats

If you use macOS Catalina, the default shell is zsh. The adapted instructions are the following:

  1. Open/Launch Terminal
  2. gem uninstall iStats (source)
  3. gem install iStats --user-install (source)
  4. Open or create ~/.zshrc
  5. At the end of the file (or where appropriate) insert: export PATH=~/.gem/ruby/2.6.0/bin:$PATH (source)
  6. Save file ~/.zshrc
  7. Source the .zshrc file: . ~/.zshrc (source)
  8. istats
  • Are you meant to be have to be super user to install iStats? I get an error No rule to make target /Library/Developer/CommandLineTools/...` when I try to install like this
    – minseong
    Apr 26, 2023 at 14:27
  • To my knowledge, there is no need to be in 'su' mode in order to do the installation (otherwise I would have written it). Nevertheless, have you tried using it?
    – pdeli
    May 1, 2023 at 9:39
  • I found that the best way to install it is likely to brew install rbenv, then rbenv init, then rbenv install -l, rbenv install 3.2.2, rbenv global 3.2.2, then finally gem install iStats
    – minseong
    May 1, 2023 at 12:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .