I'm new to Rails & Ruby in general. I was following this guide and got stuck on step 6.3. my bin/rails console
result in error below
/home/gaura/.local/share/gem/ruby/3.0.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:15:in `require': cannot load such file -- rdoc (LoadError)
from /home/gaura/.local/share/gem/ruby/3.0.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:15:in `require'
from /usr/lib/ruby/gems/3.0.0/gems/irb-1.4.1/lib/irb/input-method.rb:17:in `<main>'
from /usr/lib/ruby/gems/3.0.0/gems/irb-1.4.1/lib/irb/context.rb:14:in `require_relative'
from /usr/lib/ruby/gems/3.0.0/gems/irb-1.4.1/lib/irb/context.rb:14:in `<main>'
from /usr/lib/ruby/gems/3.0.0/gems/irb-1.4.1/lib/irb.rb:16:in `require_relative'
from /usr/lib/ruby/gems/3.0.0/gems/irb-1.4.1/lib/irb.rb:16:in `<main>'
from /home/gaura/.local/share/gem/ruby/3.0.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
from /home/gaura/.local/share/gem/ruby/3.0.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
from /home/gaura/.local/share/gem/ruby/3.0.0/gems/railties-7.0.2.3/lib/rails/commands/console/console_command.rb:3:in `<main>'
from /home/gaura/.local/share/gem/ruby/3.0.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
from /home/gaura/.local/share/gem/ruby/3.0.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
from /home/gaura/.local/share/gem/ruby/3.0.0/gems/railties-7.0.2.3/lib/rails/command/behavior.rb:44:in `block (2 levels) in lookup'
from /home/gaura/.local/share/gem/ruby/3.0.0/gems/railties-7.0.2.3/lib/rails/command/behavior.rb:40:in `each'
from /home/gaura/.local/share/gem/ruby/3.0.0/gems/railties-7.0.2.3/lib/rails/command/behavior.rb:40:in `block in lookup'
from /home/gaura/.local/share/gem/ruby/3.0.0/gems/railties-7.0.2.3/lib/rails/command/behavior.rb:39:in `each'
from /home/gaura/.local/share/gem/ruby/3.0.0/gems/railties-7.0.2.3/lib/rails/command/behavior.rb:39:in `lookup'
from /home/gaura/.local/share/gem/ruby/3.0.0/gems/railties-7.0.2.3/lib/rails/command.rb:73:in `find_by_namespace'
from /home/gaura/.local/share/gem/ruby/3.0.0/gems/railties-7.0.2.3/lib/rails/command.rb:46:in `invoke'
from /home/gaura/.local/share/gem/ruby/3.0.0/gems/railties-7.0.2.3/lib/rails/commands.rb:18:in `<main>'
from /home/gaura/.local/share/gem/ruby/3.0.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
from /home/gaura/.local/share/gem/ruby/3.0.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
from bin/rails:4:in `<main>'
what I have tried so far
gem "bootsnap", require: false
in gemfile to be gem "bootsnap"
but it still output the same errorEdit
As Stefan and ViachMoz pointed out, I seem to be missing "rdoc" gem. The error still exists after I do gem install rdoc
but adding gem "rdoc"
to gemfile solves the error. Anyway problem solved, Thank you Stefan and ViachMoz.
Try this one gem install rdoc
. Basically you're missing a gem.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.