Depending on which gems you’re using together with a specific Ruby version, you may see dependency issues such as:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension. /usr/local/bin/ruby extconf.rb *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers.
This may happen with a gem such as
debugger, which is designed to hook into low level components of a language to dynamically stop and inspect the execution of code.
This should not be done in production, so you could start by moving the gem to your
developmentgroup in your
You may be running an old version of a gem while running a later version of Ruby - try running
bundle update debuggerto update the gem. Your other option is to downgrade your Ruby version.
You could investigate what dependencies are required by running
gem install debuggeron the server, and taking note of the required packages. You could then use a manifest file or deploy hooks to automate the installation of these packages as you scale.
group :development do gem "debugger" end
Once this is done, run
bundle install, commit to your Git and re-deploy.