MAC HomeBrew getting errors - macos

(I'm using a MAC with High Sierra 10.13.10)
HomeBrew isn't working. I get errors trying to use it.
For example:
$ brew --version
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- mach (LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/Library/Homebrew/extend/pathname.rb:2:in `<top (required)>'
from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/Library/Homebrew/global.rb:3:in `<top (required)>'
from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/Library/brew.rb:15:in `<main>'

Related

Can't start debugger on RubyMine 8.0.3 and Ruby 2.2.4

C:/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- debase_internals (LoadError)
from C:/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/debase-0.2.2.beta6/lib/debase.rb:4:in `<top (required)>'
from C:/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/ruby-debug-ide-0.6.0/lib/ruby-debug-ide.rb:8:in `<top (required)>'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/ruby-debug-ide-0.6.0/bin/rdebug-ide:8:in `require_relative'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/ruby-debug-ide-0.6.0/bin/rdebug-ide:8:in `<top (required)>'
from -e:1:in `load'
from -e:1:in `<main>'
How to fix the above errors?
It is better to use byebug instead of debugger when you are using ruby version above 1.9.3 .

Can't run file.rb from command prompt

i have Ruby 2.2 and i can't run any file .rb from command prompt each time i have same error:
C:/Ruby22/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- dl/import (LoadError)
from C:/Ruby22/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/watir-classic-4.2.0/lib/watir-classic/win32.rb:1:in `<top (required)>'
from C:/Ruby22/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby22/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/watir-classic-4.2.0/lib/watir-classic.rb:32:in `<top (required)>'
from C:/Ruby22/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby22/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/watir-5.0.0-x86-mingw32/lib/watir/loader.rb:41:in `load_driver'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/watir-5.0.0-x86-mingw32/lib/watir/loader.rb:33:in `load_driver_for'
from C:/Ruby22/lib/ruby/gems/2.2.0/gems/watir-5.0.0-x86-mingw32/lib/watir/loader.rb:14:in `start'
from test.rb:2:in `<main>'
what shall i do?
Try this:
gem install net-ssh -v 2.9.3.beta1

xcode - Cocoapods stopped working after OS upgrade

After upgrading to OS X Yosemite, attempting to install pods gives me this error.
/Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- xcodeproj/prebuilt/universal.x86_64-darwin14-2.0.0/xcodeproj_ext (LoadError)
from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Library/Ruby/Gems/2.0.0/gems/xcodeproj-0.16.1/lib/xcodeproj/ext.rb:6:in `rescue in <top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/xcodeproj-0.16.1/lib/xcodeproj/ext.rb:3:in `<top (required)>'
from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Library/Ruby/Gems/2.0.0/gems/xcodeproj-0.16.1/lib/xcodeproj.rb:30:in `<top (required)>'
from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.32.1/lib/cocoapods.rb:2:in `<top (required)>'
from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.32.1/bin/pod:32:in `<top (required)>'
from /usr/bin/pod:23:in `load'
from /usr/bin/pod:23:in `<main>'
I have tried uninstalling cocoapods and installing it with no luck. I get this error upon trying to install cocoapods.
ERROR: While executing gem ... (Errno::EEXIST)
File exists # dir_s_mkdir - /usr/local/Cellar/ruby/2.1.2/lib/ruby/gems
In xcode-preferences-locations I am not given an option to change Command Line tools to anything lower than Xcode 6.3...
Any ideas how to fix this?

Cannot run sass after installing

I have sass installed on my Mac but every time I try to run I get this error.
I am on a Mac with OSX 10.9.4
Ruby 1.9.3
Andrews-iMac:~ andrewcorliss$ sass -v
/Users/andrewcorliss/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': dlopen(/Users/andrewcorliss/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/x86_64-darwin12.3.0/digest/sha1.bundle, 9): Library not loaded: /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib (LoadError)
Referenced from: /Users/andrewcorliss/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/x86_64-darwin12.3.0/digest/sha1.bundle
Reason: image not found - /Users/andrewcorliss/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/x86_64-darwin12.3.0/digest/sha1.bundle
from /Users/andrewcorliss/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/andrewcorliss/.rvm/gems/ruby-1.9.3-p392/gems/sass-3.3.14/lib/sass/engine.rb:2:in `<top (required)>'
from /Users/andrewcorliss/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/andrewcorliss/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/andrewcorliss/.rvm/gems/ruby-1.9.3-p392/gems/sass-3.3.14/lib/sass.rb:104:in `<top (required)>'
from /Users/andrewcorliss/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/andrewcorliss/.rvm/rubies/ruby-1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/andrewcorliss/.rvm/gems/ruby-1.9.3-p392/gems/sass-3.3.14/bin/sass:8:in `rescue in <top (required)>'
from /Users/andrewcorliss/.rvm/gems/ruby-1.9.3-p392/gems/sass-3.3.14/bin/sass:5:in `<top (required)>'
from /Users/andrewcorliss/.rvm/gems/ruby-1.9.3-p392/bin/sass:19:in `load'
from /Users/andrewcorliss/.rvm/gems/ruby-1.9.3-p392/bin/sass:19:in `<main>'
from /Users/andrewcorliss/.rvm/gems/ruby-1.9.3-p392/bin/ruby_noexec_wrapper:14:in `eval'
from /Users/andrewcorliss/.rvm/gems/ruby-1.9.3-p392/bin/ruby_noexec_wrapper:14:in `<main>'
Any help is appreciated.
Yeah I finally found the Answer. I did not have node or ruby on rails properly installed on my machine. Once doing a clean and installing it fresh everything worked fine.

rhc setup not working

I tried the following command rhc setup and following message is displayed
/usr/local/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require': cannot load such file -- net/ssh (LoadError)
from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require'
from /usr/local/lib/ruby/gems/1.9.1/gems/rhc-1.8.9/lib/rhc/ssh_helpers.rb:18:in `<top (required)>'
from /usr/local/lib/ruby/gems/1.9.1/gems/rhc-1.8.9/lib/rhc/wizard.rb:72:in `<class:Wizard>'
from /usr/local/lib/ruby/gems/1.9.1/gems/rhc-1.8.9/lib/rhc/wizard.rb:6:in `<module:RHC>'
from /usr/local/lib/ruby/gems/1.9.1/gems/rhc-1.8.9/lib/rhc/wizard.rb:5:in `<top (required)>'
from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require'
from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require'
from /usr/local/lib/ruby/gems/1.9.1/gems/rhc-1.8.9/lib/rhc/commands/base.rb:4:in `<top (required)>'
from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require'
from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require'
from /usr/local/lib/ruby/gems/1.9.1/gems/rhc-1.8.9/lib/rhc/commands/app.rb:1:in `<top (required)>'
from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require'
from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require'
from /usr/local/lib/ruby/gems/1.9.1/gems/rhc-1.8.9/lib/rhc/commands.rb:139:in `block in load'
from /usr/local/lib/ruby/gems/1.9.1/gems/rhc-1.8.9/lib/rhc/commands.rb:138:in `each'
from /usr/local/lib/ruby/gems/1.9.1/gems/rhc-1.8.9/lib/rhc/commands.rb:138:in `load'
from /usr/local/lib/ruby/gems/1.9.1/gems/rhc-1.8.9/lib/rhc/cli.rb:35:in `start'
from /usr/local/lib/ruby/gems/1.9.1/gems/rhc-1.8.9/bin/rhc:18:in `<top (required)>'
from /usr/local/bin/rhc:23:in `load'
from /usr/local/bin/rhc:23:in `<main>'
What is the problem?
periodically updating to the latest version of rhc is a good idea as well:
sudo gem update rhc
It should pull net-ssh in as a dependency.
Updating net-ssh to 2.9.3.beta1, as cremno suggested in this comment, resolved my problem and a few other people as well.
$ gem install net-ssh -v 2.9.3.beta1
this answer is from: rhc setup gives error `no such file dl/import`
This below code did the trick
sudo gem install net-ssh

Resources