App Academy

"byebug" is not working

Hi everyone, I am still new to coding and I keep receiving this error, and I don’t understand exactly what I’m supposed to do to fix. Any help is appreciated. Thank you guys in advance.

Traceback (most recent call last):
2: from code.rb:1:in <main>' 1: from /home/mohammed/.rbenv/versions/2.7.1/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:85:in require’
/home/mohammed/.rbenv/versions/2.7.1/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:85:in `require’: cannot load such file – byebug (LoadError)

Have you tried putting gem ‘byebug’ in the Gemfile and run bundle install (if you are currently developing with Rails framework). If not, you need to put at the beginning of the file like this

require 'byebug'

then you can put byebug or debugger somewhere the codes to debug it

That worked out perfectly!!! I really appreciate it, thank you so much!!!