0

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 – historystamp Jun 28 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 at 14:27
2

Thanks to historystamp's comment here is how the problem was solved:

  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

You must log in to answer this question.

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