-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
Lots of wanings with ruby 2.7 #12809
Comments
Same issue here. Exact same setup as mentioned. |
Same for me. |
Same as well. Fresh blackarch with system updates/upgrades |
Same here. |
They are all deprecation warnings, I don't enough ruby to refactor the deprecated code, however to silence the warning you can wrap the corresponding code in: silence_warnings do
...deprecated code...
end patching the 3 files seem to be enough to silence the warnings for
|
No idea if this is related but i have the following errors with 5.0.73-dev
|
I am also experiencing this, I am running Arch with the blackarch repos (up to date, and Ruby is ver. 2.7.0). These deprecation warnings don't seem to effect performance, but makes it hard to really do anything |
This worked for me, thanks! |
Having same issue on 5.0.73-dev with ruby version ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux] |
For reference, here's the warnings I receive with v5.0.77-dev-011ed3602c and Ruby 2.5.7p206. However,
|
For a workaround, edit /bin/msfconsole and pass
|
same issue here , manjaro with blackarch repo |
I took a quick look at this; It seems like the warnings are fixed in faraday 0.17.3 by this PR lostisland/faraday#1083 But it seems Metasploit has pinned its faraday version to Hopefully this is something we can fix 👍 |
To fix the error: /opt/metasploit/vendor/bundle/ruby/2.7.0/gems/activerecord-4.2.11.1/lib/active_record/connection_adapters/abstract_adapter.rb:84: warning: deprecated Object#=~ is called on Integer; it always returns nil Just open All it's doing is checking if the variable "config" is a string, and parsing it to an int if true. The new line does the same thing but will return false instead of nil if not true, fixing the problem. |
Is it fixed in arch linux repository? Or should I must do it manually? |
naiame-neltheri. Isn't already fixed. |
Well I didn't wanted that way but yeah it fixes the problem |
As @adamgalway-r7 addressed this issue with PR #13144 and there appears to be a workaround in the meantime, I'm going to close out this issue. |
This worked for me. Thank you. Kali path is "/usr/share/metasploit-framework/vendor/bundle/ruby/2.7.0/gems/activerecord-4.2.11.1/lib/active_record/connection_adapters/abstract_adapter.rb" |
worked perfectly , thanks! |
This issue is now fixed in version 5.0.87 of Metasploit |
Thank you man, error fix! |
Thanks Dear, warning resolve :) |
I really have no clue about Ruby ... so ... please use wisely ... don't laugh at me. I was experimenting with Kali and Metasploit and also got above warnings. I didn't see the Proc.new issue in "statement_cache.rb" addressed and continued to have the error. So I did some research (i have absolutely no clue about ruby ... really!) ... and found this article : Reading from the article by Romil, this seems to be the way to this in Ruby 2-7:
so changing the code around line 90 to :
seems to work and I get no more warnings ... hope this helps others getting less warnings using metasploit. |
This issue has been receiving a lot of questions lately and it is something that has already been addressed with the last few updates. Please update to Metasploit version 5.0.87 as per @adfoster-r7's comment which contains a number of patches for these Ruby related issues. I am going to lock this conversation as this issue has already been closed and resolved and really there should be no need for end users to be modifying Metasploit code itself to get this to work. Please note that as some distro's tend to be a few weeks behind the latest release, that it may take a few weeks to get the latest updates if you installed Metasploit via If, after updating to Metasploit 5.0.87, you are still experiencing Ruby issues with Ruby 2.7, then please raise an issue on the issue tracker as this is something we would like to get fixed. Any Ruby 2.7 issues with versions prior to Metasploit 5.0.87 will likely result in us asking the user to upgrade to Metasploit 5.0.87 first. TLDR: Already fixed in Metasploit 5.0.87, go get the updates. Community guidelines state that closed issues should not be commented on, and this issue has already been resolved several times with workarounds and an official fix. |
Steps to reproduce
How'd you do it?
This section should also tell us any relevant information about the
environment; for example, if an exploit that used to work is failing,
tell us the victim operating system and service versions.
Expected behavior
It should start without warnings
Current behavior
We get warnings
System stuff
Running on up to date Arch Linux
Metasploit version
I installed Metasploit with:
OS
What OS are you running Metasploit on?
Arch Linux
The text was updated successfully, but these errors were encountered: