使用 bundle install 安装 bcrypt 时出错
Error installing bcrypt using bundle install
我将在我的 rails 应用程序中安装一些 gem,在 Debian 测试(stretch)上使用 bundle install。我收到此错误:
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.
但我已经使用 gem install
安装了 bcrypt
和 bcrypt-ruby
。
要编译带有 C 扩展的 gem,您需要安装 ruby-dev
包:
$ sudo apt-get install ruby-dev
我将在我的 rails 应用程序中安装一些 gem,在 Debian 测试(stretch)上使用 bundle install。我收到此错误:
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.
但我已经使用 gem install
安装了 bcrypt
和 bcrypt-ruby
。
要编译带有 C 扩展的 gem,您需要安装 ruby-dev
包:
$ sudo apt-get install ruby-dev