Ubuntu: Why can't I install bcrypt?


I've a problem: when I try to install some Gem with the command "bundle install", I recive this output:

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.    /usr/bin/ruby2.1 -r ./siteconf20141210-5447-g6skes.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.1.0/gems/bcrypt-3.1.7 for inspection.  Results logged to /var/lib/gems/2.1.0/extensions/x86_64-linux/2.1.0/bcrypt-3.1.7/gem_make.out  An error occurred while installing bcrypt (3.1.7), and Bundler cannot continue.  Make sure that `gem install bcrypt -v '3.1.7'` succeeds before bundling.  

Why? How can i solve it?


In recent versions bcrypt-ruby seems to use the GMP library.

Something like this should help:

sudo aptitude install libgmp-dev  

Do not forget to install all the stuff for development:

sudo aptitude install build-essential  

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »