wpscanteam / wpscan

WPScan WordPress security scanner. Written for security professionals and blog maintainers to test the security of their WordPress websites. Contact us via contact@wpscan.com
https://wpscan.com/wordpress-cli-scanner
Other
8.54k stars 1.26k forks source link

cannot load such file -- json #1836

Open PabloMartinMoreno opened 5 months ago

PabloMartinMoreno commented 5 months ago

I can't run wpscan; I'm getting the following error:

/opt/wpscan/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.7.6/lib/active_support/core_ext/object/json.rb:4:inrequire': cannot load such file -- json (LoadError) from /opt/wpscan/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.7.6/lib/active_support/core_ext/object/json.rb:4:in <top (required)>' from /opt/wpscan/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.7.6/lib/active_support/core_ext/object.rb:13:inrequire' from /opt/wpscan/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.7.6/lib/active_support/core_ext/object.rb:13:in <top (required)>' from /opt/wpscan/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.7.6/lib/active_support/core_ext.rb:4:inrequire' from /opt/wpscan/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.7.6/lib/active_support/core_ext.rb:4:in block in <top (required)>' from /opt/wpscan/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.7.6/lib/active_support/core_ext.rb:3:ineach' from /opt/wpscan/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.7.6/lib/active_support/core_ext.rb:3:in <top (required)>' from /opt/wpscan/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.7.6/lib/active_support/all.rb:5:inrequire' from /opt/wpscan/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.7.6/lib/active_support/all.rb:5:in <top (required)>' from /opt/wpscan/lib/wpscan.rb:7:inrequire' from /opt/wpscan/lib/wpscan.rb:7:in <top (required)>' from /opt/wpscan/bin/wpscan:4:inrequire' from /opt/wpscan/bin/wpscan:4:in <main>'

I'm using the latest version of wpscan and ruby-json 2.7.1-1, which seems to be causing the error. I'm using Arch Linux.

Rahim7X commented 5 months ago

same issue in arch linux. Works on debian

uhtred-X commented 5 months ago

Yeah Same for me in Arch, tried wpsan-git as well but same error again. Also tried installation of all gems mentioned in error but no luck.

grey0ut commented 4 months ago

I'm also attempting this on Arch for the first time. I tried running gem install wpscan and noticed an error about the following folder needing to be part of my PATH or gem executables will not run: /home/grey0ut/.local/share/gem/ruby/3.0.0/bin
After appending that to my PATH variable I am now able to run wpscan without the above error. Edit to add: from the Arch wiki on Ruby https://wiki.archlinux.org/title/Ruby#Configuration

Grelo4ka commented 4 months ago

I face the same issue on Arch. Works fine once installed with gem install

uhtred-X commented 4 months ago

Yeah with 'gem install wpscan' things are working good now.