/home/muhammad/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in
require'
/home/muhammad/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:inblock in require_with_bootsnap_lfi'/home/muhammad/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in
register'
/home/muhammad/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:inrequire_with_bootsnap_lfi'/home/muhammad/.rvm/gems/ruby-2.6.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in
require'
/home/muhammad/Desktop/ruby/practice/bin/rails:9:inload'
/home/muhammad/.rvm/gems/ruby-2.6.3/gems/spring-2.1.0/lib/spring/client/rails.rb:28:incall'/home/muhammad/.rvm/gems/ruby-2.6.3/gems/spring-2.1.0/lib/spring/client/command.rb:7:in
call'
/home/muhammad/.rvm/gems/ruby-2.6.3/gems/spring-2.1.0/lib/spring/client.rb:30:inrun'/home/muhammad/.rvm/gems/ruby-2.6.3/gems/spring-2.1.0/bin/spring:49:in
<top (required)>'
/home/muhammad/.rvm/gems/ruby-2.6.3/gems/spring-2.1.0/lib/spring/binstub.rb:11:inload'/home/muhammad/.rvm/gems/ruby-2.6.3/gems/spring-2.1.0/lib/spring/binstub.rb:11:in
<top (required)>'
/home/muhammad/Desktop/ruby/practice/bin/spring:15:inrequire'/home/muhammad/Desktop/ruby/practice/bin/spring:15:in
<top (required)>'
bin/rails:3:inload'bin/rails:3:in
<main>'
Tasks: TOP => webpacker:install => webpacker:check_yarn
(See full trace by running task with --trace)

Most helpful comment
@mehdi514 @Pauloparakleto : In my case, it solved by running below commands:
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.listsudo apt update && sudo apt install yarnrails webpacker:installHope this helps !!!