我将在我的rails应用程序中使用Debian测试(拉伸)上的bundle install安装一些gem.我收到此错误:
Installing bcrypt 3.1.10 with native extensions Gem::Ext::BuildError: ERROR: Failed to build gem native extension. /usr/bin/ruby2.1 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 /tmp/bundler20151208-29851-hg3bi3bcrypt-3.1.10/gems/bcrypt-3.1.10 for inspection. Results logged to /tmp/bundler20151208-29851-hg3bi3bcrypt-3.1.10/extensions/x86_64-linux/2.1.0/bcrypt-3.1.10/gem_make.out An error occurred while installing bcrypt (3.1.10), and Bundler cannot continue. Make sure that `gem install bcrypt -v '3.1.10'` succeeds before bundling.
但我已经安装bcrypt
和bcrypt-ruby
使用gem install
.
对于要编译C扩展的gem,您需要安装该ruby-dev
包:
$ sudo apt-get install ruby-dev