Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working in macOS 10.15 Catalina #85

Closed
Liampor opened this issue Oct 12, 2019 · 22 comments
Closed

Not working in macOS 10.15 Catalina #85

Liampor opened this issue Oct 12, 2019 · 22 comments

Comments

@Liampor
Copy link

Liampor commented Oct 12, 2019

Hello,

I have updated to macOS 10.15 Catalina, then iStats does not work any more.

> iStats
zsh: /usr/local/bin/istats: bad interpreter: /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby: no such file or directory

It seems, Rubyl are not included in new macOS.

my Ruby version

>ruby -v
ruby 2.6.4p104 (2019-08-28 revision 67798) [x86_64-darwin18]

Thanks

@tomtastic
Copy link

tomtastic commented Oct 12, 2019

$ brew install ruby iStats

@phyng
Copy link

phyng commented Oct 14, 2019

sudo gem install iStats works for me in macOS 10.15 Catalina:

➜  ~ sudo gem install iStats
Password:
Fetching iStats-1.6.1.gem
Fetching sparkr-0.4.1.gem
Fetching parseconfig-1.0.8.gem
Successfully installed sparkr-0.4.1
Successfully installed parseconfig-1.0.8
Building native extensions. This could take a while...
Successfully installed iStats-1.6.1
Parsing documentation for sparkr-0.4.1
Installing ri documentation for sparkr-0.4.1
Parsing documentation for parseconfig-1.0.8
Installing ri documentation for parseconfig-1.0.8
Parsing documentation for iStats-1.6.1
Installing ri documentation for iStats-1.6.1
Done installing documentation for sparkr, parseconfig, iStats after 0 seconds
3 gems installed
➜  ~ istats           
--- CPU Stats ---
CPU temp:               44.56°C     ▁▂▃▅▆▇
......

@Chris911
Copy link
Owner

Try reinstalling the command line tools with xcode-select --install.

@Liampor
Copy link
Author

Liampor commented Oct 14, 2019

Try reinstalling the command line tools with xcode-select --install.

still not working with the same error message

@Liampor
Copy link
Author

Liampor commented Oct 14, 2019

sudo gem install iStats works for me in macOS 10.15 Catalina:

➜  ~ sudo gem install iStats
Password:
Fetching iStats-1.6.1.gem
Fetching sparkr-0.4.1.gem
Fetching parseconfig-1.0.8.gem
Successfully installed sparkr-0.4.1
Successfully installed parseconfig-1.0.8
Building native extensions. This could take a while...
Successfully installed iStats-1.6.1
Parsing documentation for sparkr-0.4.1
Installing ri documentation for sparkr-0.4.1
Parsing documentation for parseconfig-1.0.8
Installing ri documentation for parseconfig-1.0.8
Parsing documentation for iStats-1.6.1
Installing ri documentation for iStats-1.6.1
Done installing documentation for sparkr, parseconfig, iStats after 0 seconds
3 gems installed
➜  ~ istats           
--- CPU Stats ---
CPU temp:               44.56°C     ▁▂▃▅▆▇
......

still not woking, but thanks
sudo gem install iStats
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
╭─  ~ 
╰─ istats
zsh: /usr/local/bin/istats: bad interpreter: /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby: no such file or directory

@Chris911
Copy link
Owner

Did you try reinstalling iStats? The error is looking for for a ruby executable in the 2.3 folder but from your ruby -v it looks like you have 2.6 installed.

@Liampor
Copy link
Author

Liampor commented Oct 14, 2019

Did you try reinstalling iStats? The error is looking for for a ruby executable in the 2.3 folder but from your ruby -v it looks like you have 2.6 installed.

I have tried "sudo gem install iStats" and brew install ruby... not working

@Liampor
Copy link
Author

Liampor commented Oct 14, 2019

Did you try reinstalling iStats? The error is looking for for a ruby executable in the 2.3 folder but from your ruby -v it looks like you have 2.6 installed.

I think iStats needs ruby 2.3, but new macOS remove the ruby 2.3 and my user-ruby is Ruby 2.6

@Chris911
Copy link
Owner

Try gem uninstall iStats and then gem install iStats

@Liampor
Copy link
Author

Liampor commented Oct 14, 2019

Try gem uninstall iStats and then gem install iStats

still...

image

@Chris911
Copy link
Owner

Chris911 commented Oct 14, 2019

Ah try istats all lowercase instead of iStats.

@Liampor
Copy link
Author

Liampor commented Oct 14, 2019

Ah try istats all lowercase instead of iStats.

same error :-)

@Chris911
Copy link
Owner

I don't know then. Still find it weird that the error is for 2.3 and you have 2.6 installed. I just uninstalled and reinstalled on my machine running Catalina and have no errors. I didn't have to use sudo.

@Liampor
Copy link
Author

Liampor commented Oct 14, 2019

I don't know then. Still find it weird that the error is for 2.3 and you have 2.6 installed. I just uninstalled and reinstalled on my machine running Catalina and have no errors. I didn't have to use sudo.

thanks, use "gem install iStats" it gives more errors

image

@phyng
Copy link

phyng commented Oct 14, 2019

@Liampor Inferred from your log, take a look at /usr/local/bin/istats, update first line to 2.6 (or the output of which ruby) maybe can solve this:

➜   which ruby
/usr/bin/ruby
 ➜  cat /usr/local/bin/istats
#!/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby

@Liampor
Copy link
Author

Liampor commented Oct 14, 2019

@Liampor Inferred from your log, take a look at /usr/local/bin/istats, update first line to 2.6 (or the output of which ruby) maybe can solve this:

➜   which ruby
/usr/bin/ruby
 ➜  cat /usr/local/bin/istats
#!/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby

#!/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby

gives

image

@Liampor
Copy link
Author

Liampor commented Oct 14, 2019

@Chris911 @phyng

Finally solved! Thank you all!

I have two Ruby path:

  1. /usr/local/opt/ruby/bin/ruby (default, installed by Homebrew)
  2. /usr/bin/ruby

If set default ruby-path to /usr/bin/ruby und reinstall iStats by sudo gem install iStats then edit /usr/local/bin/istats headline to #!/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby

it works fine !

@Liampor Liampor closed this as completed Oct 15, 2019
@guchongxi
Copy link

@Liampor I have same problem, two Ruby path; and I don't know how to set default ruby-path

@Liampor
Copy link
Author

Liampor commented Oct 17, 2019

@Liampor I have same problem, two Ruby path; and I don't know how to set default ruby-path

Step 1:
set ruby-path to /usr/bin/ruby
to do this, you can edit your Terminal profile,for example in ZSH
export PATH="/usr/bin:$PATH"

Step 2:

Quit Terminal and reopen.

run which ruby If anything is right you will see /usr/bin/ruby

Step 3:

reinstall iStats

uninstall: sudo gem uninstall iStats
then reinstall: sudo gem install iStats

worked!

If you want to use other Ruby-path, you can edit the terminal profile later.

ps. 用我的蹩脚英语和中国人对话好奇怪。。

@guchongxi
Copy link

guchongxi commented Oct 21, 2019 via email

@yuzuri
Copy link

yuzuri commented Feb 8, 2021

Hi all,
I also got same trouble and reached here.
@Liampor, thank you for giving me the answer!

Did you try reinstalling iStats? The error is looking for for a ruby executable in the 2.3 folder but from your ruby -v it looks like you have 2.6 installed.

I think iStats needs ruby 2.3, but new macOS remove the ruby 2.3 and my user-ruby is Ruby 2.6

I installed ruby 2.3 via mac ports and changed the default ruby and succeeded to install iStats.

% sudo port install ruby23
% sudo port install ruby_select
% sudo port select --set ruby ruby23
% sudo gem install iStats -n /usr/local/bin 

environment : Mac OSX catalina (10.15.7)

@Nakilon
Copy link

Nakilon commented Feb 10, 2021

When using Homebrew I recommend installing custom Rubies via brew install rbenv and following the instructions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants