Homebrew started blowing up, no idea why - homebrew

I probably did some unwise things. After a brew update and a brew doctor kept throwing the same error, I tried to uninstall and reinstall it with the shell scripts for those. They mostly worked but upon reinstall, I got the same error bookended by the normal homebrew install output. So now in addition to losing homebrew itself, I've lost all the brew-installed tools. It's unclear what I've screwed up to cause this. Error output below:
Traceback (most recent call last):
15: from /usr/local/Homebrew/Library/Homebrew/brew.rb:23:in `<main>'
14: from /usr/local/Homebrew/Library/Homebrew/brew.rb:23:in `require_relative'
13: from /usr/local/Homebrew/Library/Homebrew/global.rb:19:in `<top (required)>'
12: from /usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.8.3/lib/i18n/backend/simple.rb:50:in `available_locales'
11: from /usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.8.3/lib/i18n/backend/simple.rb:80:in `init_translations'
10: from /usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.8.3/lib/i18n/backend/base.rb:18:in `load_translations'
9: from /usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.8.3/lib/i18n/backend/base.rb:18:in `each'
8: from /usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.8.3/lib/i18n/backend/base.rb:18:in `block in load_translations'
7: from /usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.8.3/lib/i18n/backend/base.rb:226:in `load_file'
6: from /usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.8.3/lib/i18n/backend/base.rb:243:in `load_yml'
5: from /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.3_1/lib/ruby/2.6.0/psych.rb:577:in `load_file'
4: from /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.3_1/lib/ruby/2.6.0/psych.rb:577:in `open'
3: from /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.3_1/lib/ruby/2.6.0/psych.rb:578:in `block in load_file'
2: from /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.3_1/lib/ruby/2.6.0/psych.rb:277:in `load'
1: from /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.3_1/lib/ruby/2.6.0/psych.rb:390:in `parse'
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.3_1/lib/ruby/2.6.0/psych.rb:455:in `parse_stream': uninitialized constant Psych::Handlers (NameError)
10: from /usr/local/Homebrew/Library/Homebrew/brew.rb:23:in `<main>'
9: from /usr/local/Homebrew/Library/Homebrew/brew.rb:23:in `require_relative'
8: from /usr/local/Homebrew/Library/Homebrew/global.rb:19:in `<top (required)>'
7: from /usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.8.3/lib/i18n/backend/simple.rb:50:in `available_locales'
6: from /usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.8.3/lib/i18n/backend/simple.rb:80:in `init_translations'
5: from /usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.8.3/lib/i18n/backend/base.rb:18:in `load_translations'
4: from /usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.8.3/lib/i18n/backend/base.rb:18:in `each'
3: from /usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.8.3/lib/i18n/backend/base.rb:18:in `block in load_translations'
2: from /usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.8.3/lib/i18n/backend/base.rb:226:in `load_file'
1: from /usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.8.3/lib/i18n/backend/base.rb:241:in `load_yml'
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/i18n-1.8.3/lib/i18n/backend/base.rb:245:in `rescue in load_yml': can not load translations from /usr/local/Homebrew/Library/Homebrew/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.1/lib/active_support/locale/en.yml: #<NameError: uninitialized constant Psych::Handlers> (I18n::InvalidLocaleData)

Hope I am not too late for this thread, I have definitely seen this issue before.
Can you try the following two lines to see if it helps?
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.3_1/bin/gem update --system
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.3_1/bin/gem pristine --all
Worst case is you just need to remove ~/.gems, and brew would re-download the gem dependencies.
If would be great that you can attach your MacOS information.

Related

No rakefile found(msfdb init)

I have database.yml error when i open armitage(postgresql connection established) so i installed gems via bundle install. also did gem install rake. i deleted database.yml file because armitage was not accepting it, then i tried to create it but i get the following error(yml file is actually created but have missing parts):
msfdb init
Metasploit running on Kali Linux as root, using system database
Resetting password of database user 'msf'
Creating databases 'msf' and 'msf_test'
┏━(Message from Kali developers)
┃
┃ This is a minimal installation of Kali Linux, you likely
┃ want to install supplementary tools. Learn how:
┃ ⇒ https://www.kali.org/docs/troubleshooting/common-minimum-setup/
┃
┃ We have kept /usr/bin/python pointing to Python 2 for backwards
┃ compatibility. Learn how to change this and avoid this message:
┃ ⇒ https://www.kali.org/docs/general-use/python3-transition/
┃
┗━(Run: “touch ~/.hushlogin” to hide this message)
Creating configuration file in /usr/share/metasploit-framework/config/database.yml
Creating initial database schema
bundler: failed to load command: rake (/opt/metasploit-framework/embedded/bin/rake)
Traceback (most recent call last):
22: from /opt/metasploit-framework/embedded/bin/bundle:23:in `<main>'
21: from /opt/metasploit-framework/embedded/bin/bundle:23:in `load'
20: from /opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/exe/bundle:37:in `<top (required)>'
19: from /opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/lib/bundler/friendly_errors.rb:128:in `with_friendly_errors'
18: from /opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/exe/bundle:49:in `block in <top (required)>'
17: from /opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/lib/bundler/cli.rb:25:in `start'
16: from /opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
15: from /opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/lib/bundler/cli.rb:31:in `dispatch'
14: from /opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
13: from /opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
12: from /opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
11: from /opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/lib/bundler/cli.rb:477:in `exec'
10: from /opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/lib/bundler/cli/exec.rb:23:in `run'
9: from /opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/lib/bundler/cli/exec.rb:56:in `kernel_load'
8: from /opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/lib/bundler/cli/exec.rb:56:in `require_relative'
7: from /opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/lib/bundler/setup.rb:20:in `<top (required)>'
6: from /opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/lib/bundler/ui/shell.rb:88:in `silence'
5: from /opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/lib/bundler/ui/shell.rb:136:in `with_level'
4: from /opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/lib/bundler/setup.rb:20:in `block in <top (required)>'
3: from /opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/lib/bundler.rb:149:in `setup'
2: from /opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/lib/bundler/runtime.rb:18:in `setup'
1: from /opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/lib/bundler/definition.rb:228:in `specs_for'
/opt/metasploit-framework/embedded/lib/ruby/gems/2.7.0/gems/bundler-2.2.26/lib/bundler/definition.rb:490:in `materialize': Could not find jekyll-4.2.0, colorator-1.1.0, em-websocket-0.5.2, jekyll-sass-converter-2.1.0, jekyll-watch-2.2.1, kramdown-2.3.1, kramdown-parser-gfm-1.1.0, liquid-4.0.3, mercenary-0.4.0, pathutil-0.16.2, rouge-3.26.0, safe_yaml-1.0.5, terminal-table-2.0.0, http_parser.rb-0.6.0, concurrent-ruby-1.1.9, sassc-2.4.0, listen-3.7.0, forwardable-extended-2.6.0, unicode-display_width-1.7.0, rb-fsevent-0.11.0, rb-inotify-0.10.1 in any of the sources (Bundler::GemNotFound)
Also as you can see i get other errors but it's solved if I run the command in root directory if i remember correctly(trying to solve this for 6 hours and forgot in which case it was solving.)
But first problem is rake. So can anyone please help me about these? I couldn't find any rakefile and don't know what to do.

Trying to update Homebrew on MacOS but got error saying "LibreSSL error"

I have late 2013 MacBook Pro. Very good laptop to last me long time! My software was updated to MacOS Big Sur. Anyway, I haven't updated homebrew in a while and I was trying to updated it.
However, when I typed in brew outdated, I get this:
Traceback (most recent call last):
11: from /usr/local/Homebrew/Library/Homebrew/brew.rb:23:in `<main>'
10: from /usr/local/Homebrew/Library/Homebrew/brew.rb:23:in `require_relative'
9: from /usr/local/Homebrew/Library/Homebrew/global.rb:29:in `<top (required)>'
8: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
7: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
6: from /usr/local/Homebrew/Library/Homebrew/os.rb:3:in `<top (required)>'
5: from /usr/local/Homebrew/Library/Homebrew/os.rb:21:in `<module:OS>'
4: from /usr/local/Homebrew/Library/Homebrew/os/mac.rb:58:in `prerelease?'
3: from /usr/local/Homebrew/Library/Homebrew/os/mac.rb:24:in `version'
2: from /usr/local/Homebrew/Library/Homebrew/os/mac.rb:24:in `new'
1: from /usr/local/Homebrew/Library/Homebrew/os/mac/version.rb:26:in `initialize'
/usr/local/Homebrew/Library/Homebrew/version.rb:368:in `initialize': Version value must be a string; got a NilClass () (TypeError)
and typing in brew update get this:
fatal: the remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
I don't know what's happening and what I should do. I tried looking up the problem but some of them are outdated or confusing.
Also when I typed in brew --version, I got this:
Traceback (most recent call last):
11: from /usr/local/Homebrew/Library/Homebrew/brew.rb:23:in `<main>'
10: from /usr/local/Homebrew/Library/Homebrew/brew.rb:23:in `require_relative'
9: from /usr/local/Homebrew/Library/Homebrew/global.rb:29:in `<top (required)>'
8: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
7: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
6: from /usr/local/Homebrew/Library/Homebrew/os.rb:3:in `<top (required)>'
5: from /usr/local/Homebrew/Library/Homebrew/os.rb:21:in `<module:OS>'
4: from /usr/local/Homebrew/Library/Homebrew/os/mac.rb:58:in `prerelease?'
3: from /usr/local/Homebrew/Library/Homebrew/os/mac.rb:24:in `version'
2: from /usr/local/Homebrew/Library/Homebrew/os/mac.rb:24:in `new'
1: from /usr/local/Homebrew/Library/Homebrew/os/mac/version.rb:26:in `initialize'
/usr/local/Homebrew/Library/Homebrew/version.rb:368:in `initialize': Version value must be a string; got a NilClass () (TypeError)
Do I uninstall and start over again? Does it has something to do with my zsh shell that I'm using as the default version in my iTerm2? Or does it has something to do with slow internet connection?

Rails and Rake aborted! unknown binary format

when i use any rails or rake commands I get this error:
33: from bin/rails:4:in `<main>'
32: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bootsnap-1.7.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
31: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bootsnap-1.7.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
30: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bootsnap-1.7.0/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
29: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bootsnap-1.7.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
28: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bootsnap-1.7.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
27: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.1.1/lib/rails/commands.rb:18:in `<main>'
26: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.1.1/lib/rails/command.rb:50:in `invoke'
25: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.1.1/lib/rails/command/base.rb:69:in `perform'
24: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/thor-1.1.0/lib/thor.rb:392:in `dispatch'
23: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/thor-1.1.0/lib/thor/invocation.rb:127:in `invoke_command'
22: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/thor-1.1.0/lib/thor/command.rb:27:in `run'
21: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.1.1/lib/rails/commands/help/help_command.rb:11:in `help'
20: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.1.1/lib/rails/command.rb:92:in `print_commands'
19: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.1.1/lib/rails/command.rb:102:in `commands'
18: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.1.1/lib/rails/command.rb:102:in `flat_map'
17: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.1.1/lib/rails/command.rb:102:in `each'
16: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.1.1/lib/rails/commands/rake/rake_command.rb:12:in `printing_commands'
15: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.1.1/lib/rails/commands/rake/rake_command.rb:43:in `formatted_rake_tasks'
14: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.1.1/lib/rails/commands/rake/rake_command.rb:34:in `rake_tasks'
13: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-6.1.1/lib/rails/command/actions.rb:22:in `require_application!'
12: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.1.1/lib/active_support/dependencies.rb:332:in `require'
11: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.1.1/lib/active_support/dependencies.rb:299:in `load_dependency'
10: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.1.1/lib/active_support/dependencies.rb:332:in `block in require'
9: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bootsnap-1.7.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
8: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bootsnap-1.7.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
7: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bootsnap-1.7.0/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
6: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bootsnap-1.7.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
5: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bootsnap-1.7.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
4: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bootsnap-1.7.0/lib/bootsnap/compile_cache/iseq.rb:55:in `load_iseq'
3: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bootsnap-1.7.0/lib/bootsnap/compile_cache/iseq.rb:30:in `fetch'
2: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bootsnap-1.7.0/lib/bootsnap/compile_cache/iseq.rb:30:in `fetch'
1: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bootsnap-1.7.0/lib/bootsnap/compile_cache/iseq.rb:19:in `storage_to_output'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bootsnap-1.7.0/lib/bootsnap/compile_cache/iseq.rb:19:in `load_from_binary': unknown binary format (RuntimeError)
my environment is ruby 2.6, rails 6, win10, I remember the day before I had the blue screen problem (I think it's related to the hard drive), I was just installing my dependencies with bundle install and then the blue screen problem occurred, shut the pc that day, today this problem happened to me, so maybe the two problems are related? maybe the format in the hard drive that day did change or something.
I run into same problem. I don't think it was HD, I've checked it and it seemed fine, I think it was because I forcefully shut down rails during some rendering operation.
Solution
For me I didn't have to re-clone my repo, all I had to do is rm -rf tmp (delete tmp folder from project).
the problem was really the hard drive, a section of it was corrupted duo of some hit or shaking (i traveled a lot with my pc at this period), the corrupted files was in the project file not in the ruby gems or in any other projects so, removing the older project and creating a new one solved the problem.

Problem making bundle install in the console when i change from ruby 2.3.7 to ruby 2.5

i already try a lot o diferent way but cant solve this problem
.it seems that i cant install gems but i cant figure out why
already try with gem install bundler but steel doestn work
taller_integracion git:(develop) bundle install
Traceback (most recent call last):
7: from /Users/seba/.rvm/gems/ruby-2.5.3/bin/ruby_executable_hooks:24:in `<main>'
6: from /Users/seba/.rvm/gems/ruby-2.5.3/bin/ruby_executable_hooks:24:in `eval'
5: from /Users/seba/.rvm/gems/ruby-2.5.3/bin/bundle:23:in `<main>'
4: from /Users/seba/.rvm/gems/ruby-2.5.3/bin/bundle:23:in `load'
3: from /Users/seba/.rvm/gems/ruby-2.5.3/gems/bundler-0.9.26/bin/bundle:13:in `<top (required)>'
2: from /Users/seba/.rvm/gems/ruby-2.5.3/gems/bundler-0.9.26/lib/bundler/vendor/thor.rb:124:in `start'
1: from /Users/seba/.rvm/gems/ruby-2.5.3/gems/bundler-0.9.26/lib/bundler/vendor/thor/base.rb:377:in `start'
/Users/seba/.rvm/gems/ruby-2.5.3/gems/bundler-0.9.26/lib/bundler/vendor/thor/shell.rb:10:in `shell': uninitialized constant Thor::Base::Config (NameError)
and if i try with:
taller_integracion git:(develop) bundler install
Traceback (most recent call last):
10: from /Users/seba/.rvm/gems/ruby-2.5.3/bin/ruby_executable_hooks:10:in `<main>'
9: from /Users/seba/.rvm/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0/gems/executable-hooks-1.6.0/lib/executable-hooks/hooks.rb:49:in `run'
8: from /Users/seba/.rvm/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0/gems/executable-hooks-1.6.0/lib/executable-hooks/hooks.rb:49:in `each'
7: from /Users/seba/.rvm/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0/gems/executable-hooks-1.6.0/lib/executable-hooks/hooks.rb:50:in `block in run'
6: from /Users/seba/.rvm/gems/ruby-2.5.3#global/gems/rubygems-bundler-1.4.5/lib/rubygems_executable_plugin.rb:4:in `block in <top (required)>'
5: from /Users/seba/.rvm/rubies/ruby-2.5.3/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:39:in `require'
4: from /Users/seba/.rvm/rubies/ruby-2.5.3/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
3: from /Users/seba/.rvm/rubies/ruby-2.5.3/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:135:in `require'
2: from /Users/seba/.rvm/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0/gems/rubygems-bundler-1.4.5/lib/rubygems-bundler/noexec.rb:131:in `<top (required)>'
1: from /Users/seba/.rvm/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0/gems/rubygems-bundler-1.4.5/lib/rubygems-bundler/noexec.rb:124:in `check'
/Users/seba/.rvm/rubies/ruby-2.5.3/lib/ruby/gems/2.5.0/gems/rubygems-bundler-1.4.5/lib/rubygems-bundler/noexec.rb:84:in `setup': undefined method `rubygems' for Bundler:Module (NoMethodError)
I faced this problem. I was working on a small project hence I just updated ruby version in gemfile to 2.6.3 and it worked for me.
create a new gemset with this ruby version and then run
gem install bundler
to install bundler with the latest ruby.
Now run
bundle install
if bundle install does not work then try
bundle update
this should do the trick.
If you are still facing the same issue then let me know.

Rails test error " UNIXServer is required (LoadError)" on windows

I am running into an issue when trying to execute "rails test" on windows.
Issue:
17: from test/controllers/users_controller_test.rb:1:in `<main>'
16: from C:/Ruby25-x64/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
15: from C:/Ruby25-x64/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
14: from C:/Users/ES0074223/RubyOnRails/firefly/test/test_helper.rb:5:in `<top (required)>'
13: from C:/Users/ES0074223/RubyOnRails/firefly/test/test_helper.rb:6:in `<class:TestCase>'
12: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/activesupport-6.0.0.beta1/lib/active_support/test_case.rb:82:in `parallelize'
11: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/activesupport-6.0.0.beta1/lib/active_support/test_case.rb:82:in `new'
10: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/activesupport-6.0.0.beta1/lib/active_support/testing/parallelization.rb:54:in `initialize'
9: from C:/Ruby25-x64/lib/ruby/2.5.0/drb/drb.rb:1710:in `start_service'
8: from C:/Ruby25-x64/lib/ruby/2.5.0/drb/drb.rb:1710:in `new'
7: from C:/Ruby25-x64/lib/ruby/2.5.0/drb/drb.rb:1404:in `initialize'
6: from C:/Ruby25-x64/lib/ruby/2.5.0/drb/drb.rb:772:in `open_server'
5: from C:/Ruby25-x64/lib/ruby/2.5.0/drb/drb.rb:804:in `auto_load'
4: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/activesupport-6.0.0.beta1/lib/active_support/dependencies.rb:297:in `require'
3: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/activesupport-6.0.0.beta1/lib/active_support/dependencies.rb:263:in `load_dependency'
2: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/activesupport-6.0.0.beta1/lib/active_support/dependencies.rb:297:in `block in require'
1: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/activesupport-6.0.0.beta1/lib/active_support/dependencies.rb:297:in `require'
C:/Ruby25-x64/lib/ruby/2.5.0/drb/unix.rb:6:in `<top (required)>': UNIXServer is required (LoadError)
Any help is much appreciated.
Might be related to Rails Issue #34410 Windows support for parallelization and instrumenter
Problem still exists today (end of nov 2019)
$ rails test
Traceback (most recent call last):
28: from bin/rails:9:in `<main>'
...
8: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/activesupport-6.0.1/lib/active_support/testing/parallelization.rb:58:in `initialize'
7: from C:/Ruby26-x64/lib/ruby/2.6.0/drb/drb.rb:1715:in `start_service'
6: from C:/Ruby26-x64/lib/ruby/2.6.0/drb/drb.rb:1715:in `new'
5: from C:/Ruby26-x64/lib/ruby/2.6.0/drb/drb.rb:1403:in `initialize'
4: from C:/Ruby26-x64/lib/ruby/2.6.0/drb/drb.rb:772:in `open_server'
3: from C:/Ruby26-x64/lib/ruby/2.6.0/drb/drb.rb:804:in `auto_load'
2: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/zeitwerk-2.2.1/lib/zeitwerk/kernel.rb:23:in `require'
1: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/zeitwerk-2.2.1/lib/zeitwerk/kernel.rb:23:in `require'
C:/Ruby26-x64/lib/ruby/2.6.0/drb/unix.rb:6:in `<top (required)>': UNIXServer is required (LoadError)
The important part of the error messages was from testing/parallelization.rb.
In test/test_helper.rb: add "with threads":
parallelize(workers: :number_of_processors, with: :threads)
But this alone did not solve the problem. I also had
to upgrade sass-rails to version 6 (I had 5 before) in the Gemfile:
gem 'sass-rails', '>= 6'
and do a bundle update.
Why sass-rails is involved is a mystery.
From this article, it looks like this issue comes from the application using Unix sockets, which isn't supported on Windows.
I strongly suggest you run the application in Docker. This will solve your issues, but will -- of course -- not be a native windows experience.

Resources