Bundle Install Error while installing byebug 5.0.0

I was trying run the “bundle install” and an error came up saying:
“An error occurred while installing byebug (5.0.0), and Bundler cannot continue.
Make sure that gem install byebug -v '5.0.0' succeeds before bundling”
I’m not sure what I can do differently to get it to install properly. Any help is greatly appreciated

Also to note I was having issues with the install_requirements and install_dotfiles as well and have moved the .bash_profile and .bashrc to the root directory. Only the install_dotfiles for the configuration is still giving trouble.

Hi, did you run the recommended install command to see the specific error that occurs when trying to install the byebug gem? This error should tell us what may be causing the issue with regards to installation requirements.

Hi Kevin. I just ran the byebug install command and it worked out fine. Thanks for the assist!

Hi Kevin,

I’m having the same problem, except running

gem install byebug

still does not work. The error I get is

ERROR: While executing gem … (Gem::FilePermissionError)
You don’t have write permissions for the /var/lib/gems/2.3.0 directory.

So I then tried

sudo gem install byebug

and it gave me the error

Building native extensions.  This could take a while...
ERROR:  Error installing byebug:
ERROR: Failed to build gem native extension.

current directory: /var/lib/gems/2.3.0/gems/byebug-5.0.0/ext/byebug
/usr/bin/ruby2.3 -r ./siteconf20170428-5289-1b3pg9b.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h

extconf failed, exit code 1

Gem files will remain installed in /var/lib/gems/2.3.0/gems/byebug-5.0.0 for inspection.
Results logged to /var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/byebug-5.0.0/gem_make.out

I’m not sure how to fix this. I’m using Ubuntu.

Update: I was able to fix the headers issue by running

sudo apt-get install ruby-dev