Gem::Ext::Builderror: Error: Failed to Build Gem Native Extension Bcrypt-Ruby

Gem::Ext::BuildError: ERROR: Failed to build gem native extension Bcrypt-Ruby

I had the same problem which I solved by re-installing the XCode command line developer tools :

xcode-select --install
bundle install

bcrypt-ruby 3.1.2 Gem::Ext::BuildError: ERROR: Failed to build gem native extension in OSX

When upgrading to Ruby 2.1.x in OS X El Capitan:
For some of the native extensions to build you need to make sure that the coreutils package is installed.

To do this run:

brew install coreutils

This could also cause similar failures for raindrops, pg, kgio, http_parser, fast-stemmer, unf_ext, ffi, debug-inspector, and nokogiri

Error installing bcrypt using bundle install

For gems with C extensions to compile, you'll need to install the ruby-dev package:

$ sudo apt-get install ruby-dev

Unable to install gem - Failed to build gem native extension - cannot load such file -- mkmf (LoadError)

There are similar questions:

  • `require': no such file to load -- mkmf (LoadError)
  • Failed to build gem native extension (mkmf (LoadError)) - Ubuntu 12.04

Usually, the solution is:

sudo apt-get install ruby-dev

Or, if that doesn't work, depending on your ruby version, run something like:

sudo apt-get install ruby1.9.1-dev

Should fix your problem.


Still not working? Try the following after installing ruby-dev:

sudo apt-get install make

Gem::Ext::BuildError: ERROR: Failed to build gem native extension trying to install postgresql

Because you're using the yum package manager, the package name is wrong. libpq-dev is the package name for the apt package manager. Try installing postgresql-libs. If that doesn't work, try postgresql-devel.

When I run bundle install i'm getting error with bcrypt gem

I made changes in the gem file by replacing gem 'bcrypt' instead of gem 'bcrypt-ruby' and did bundle install and worked for me!!



Related Topics



Leave a reply



Submit