No rakefile found(msfdb init) - ruby-on-rails

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.

Related

command 'rails server' doesn't work, cmd throws error with bootsnap

I have created project in path: D:\Сайты\ruby\lr5. When I am trying to launch it by command rails server it throws this error:
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/compile_cache/iseq.rb:60:in `fetch': No such file or directory - bs_fetch:open_current_file:open (Errno::ENOENT)
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/compile_cache/iseq.rb:60:in `fetch'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/compile_cache/iseq.rb:85:in `load_iseq'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/railties-7.0.4/lib/rails/commands/server/server_command.rb:137:in `block in perform'
from <internal:kernel>:90:in `tap'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/railties-7.0.4/lib/rails/commands/server/server_command.rb:134:in `perform'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/railties-7.0.4/lib/rails/command/base.rb:87:in `perform'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/railties-7.0.4/lib/rails/command.rb:48:in `invoke'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/railties-7.0.4/lib/rails/commands.rb:18:in `<main>'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
from bin/rails:4:in `<main>'
I was trying to uninstall bootsnap, which has been download automatically with gem install rails, and install it manually, but it didn't give any positive result.
My OS is Windows 10 Home
My Ruby version is 3.1.0
I have downloaded Ruby from official by executable file (name is 'rubyinstaller-devkit-3.1.3-1-x64.exe'). Then I have installed gems MySQL and rails.
P.s Sorry for my english <3
I found a solution!
First problem: You can't use russian symbols in your path.
Second problem: In your Gemfile, it must be written this gem "tzinfo-data" (without requirements).

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.

failed to allocate memory (NoMemoryError) when using RAILS_ENV="production" bundle exec rails c

We just upgraded a Rails app to 4.2 to 5.2, everything is working like a charm in development, but when we try to release the app on our production servers, we can't run any rails related commands (assets precompilation, migrate, console, etc.).
Here is the trace:
Traceback (most recent call last):
15: from bin/rails:4:in `<main>'
14: from bin/rails:4:in `require'
13: from /var/deploy/slaask_kb/web_head/shared/bundle/ruby/2.6.0/gems/railties-5.2.3/lib/rails/commands.rb:18:in `<top (required)>'
12: from /var/deploy/slaask_kb/web_head/shared/bundle/ruby/2.6.0/gems/railties-5.2.3/lib/rails/command.rb:46:in `invoke'
11: from /var/deploy/slaask_kb/web_head/shared/bundle/ruby/2.6.0/gems/railties-5.2.3/lib/rails/command/base.rb:65:in `perform'
10: from /var/deploy/slaask_kb/web_head/shared/bundle/ruby/2.6.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
9: from /var/deploy/slaask_kb/web_head/shared/bundle/ruby/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
8: from /var/deploy/slaask_kb/web_head/shared/bundle/ruby/2.6.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
7: from /var/deploy/slaask_kb/web_head/shared/bundle/ruby/2.6.0/gems/railties-5.2.3/lib/rails/commands/console/console_command.rb:95:in `perform'
6: from /var/deploy/slaask_kb/web_head/shared/bundle/ruby/2.6.0/gems/railties-5.2.3/lib/rails/command/actions.rb:15:in `require_application_and_environment!'
5: from /var/deploy/slaask_kb/web_head/shared/bundle/ruby/2.6.0/gems/railties-5.2.3/lib/rails/command/actions.rb:28:in `require_environment!'
4: from /var/deploy/slaask_kb/web_head/shared/bundle/ruby/2.6.0/gems/railties-5.2.3/lib/rails/application.rb:337:in `require_environment!'
3: from /var/deploy/slaask_kb/web_head/shared/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:292:in `require'
2: from /var/deploy/slaask_kb/web_head/shared/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency'
1: from /var/deploy/slaask_kb/web_head/shared/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `block in require'
/var/deploy/slaask_kb/web_head/shared/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require': failed to allocate memory (NoMemoryError)
We added puts file; just before the result = super in dependencies.rb:291, and a puts 'ERROR!' in the rescue in dependencies.rb#L260 and here are the last loaded files:
active_support/per_thread_registry
rack/runtime
rack/utils
active_support/cache/strategy/local_cache_middleware
rack/body_proxy
rack/utils
tzinfo/data
ERROR!
active_support/core_ext/time/zones
ERROR!
Traceback (most recent call last):
More information:
There is 52G of memory on the server, and we already tried adding 10G of SWAP.
Running htop is not giving any Memory leak
EDIT:
We tried removing the raise in dependencies.rb#L261 and of course the console loads, here are the logs:
rack/body_proxy
rack/utils
tzinfo/data
ERROR!
active_support/core_ext/time/zones
tzinfo/data/definitions/America/New_York
ERROR!
/var/deploy/slaask_kb/web_head/shared/bundle/ruby/2.6.0/gems/tzinfo-1.2.5/lib/tzinfo/ruby_data_source.rb:35: warning: constant ::Data is deprecated
/var/deploy/slaask_kb/web_head/shared/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:396: warning: constant ::Data is deprecated
/var/deploy/slaask_kb/web_head/shared/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/inflector/methods.rb:283: warning: constant ::Data is deprecated
ERROR!
rails/console/app
active_support/all
action_controller
rails/console/helpers
active_record/base
pp
Loading production environment (Rails 5.2.3)
e2mmap
ERROR!
irb(main):001:0>
I was able to reproduce the issue on a development environment (Windows Subsystem for Linux) too.
We finally managed to solve it by upgrading tzinfo from 1.1 to 1.2.5, as suggested here: https://github.com/tzinfo/tzinfo/issues/30

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