当前位置:  开发笔记 > 后端 > 正文

使用bundle install安装bcrypt时出错

如何解决《使用bundleinstall安装bcrypt时出错》经验,为你挑选了1个好方法。

我将在我的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.

但我已经安装bcryptbcrypt-ruby使用gem install.



1> Drenmi..:

对于要编译C扩展的gem,您需要安装该ruby-dev包:

$ sudo apt-get install ruby-dev

推荐阅读
有风吹过best
这个屌丝很懒,什么也没留下!
DevBox开发工具箱 | 专业的在线开发工具网站    京公网安备 11010802040832号  |  京ICP备19059560号-6
Copyright © 1998 - 2020 DevBox.CN. All Rights Reserved devBox.cn 开发工具箱 版权所有