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
Rails Sort Tags by Most Used (Tag.Posts.Count)
How to Make Users Automatically Follow Admin User on Sign Up
How to Loop Through a Daterange with Different Intervals
What's the Difference Between Bundle.Setup and Bundle.Require
Rendering Haml Partials from Within Haml Outside of Rails
Printing to Screen in a Rake Task
Convert String to Class Name Without Using Eval in Ruby
Getting Devise Sign_In Form into Twitter Bootstrap Modal
How to Tokenize This String in Ruby
Print All Method Names of a Class in Ruby
Rails: Pg::Insufficientprivilege: Error: Permission Denied for Relation Schema_Migrations
After Installing Ruby Gems, Running the New Gem Returns "Could Not Find" Errors
Check Time Between 9.30 to 4 Ruby
How to Handle Multiple Models in One Rails Form
Change Default Capybara Browser Window Size