简体   繁体   English

安装bcrypt 3.1.7时发生错误,捆绑器无法继续

[英]An error occurred while installing bcrypt 3.1.7 and bundler cannot continue

I'm using rubystack2.2.0. 我正在使用rubystack2.2.0。 When I run bundle install for a new project that uses bcrypt, I'm getting this error: 当我为使用bcrypt的新项目运行bundle install时,出现此错误:

Installing bcrypt 3.1.7 with native extensions 使用本机扩展安装bcrypt 3.1.7

Gem::Ext::BuildError: ERROR: Failed to build gem native extension

and here is the verbose output 这是详细的输出

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

/ws/sachilig-sjc/new/ruby/bin/ruby -r ./siteconf20150709-16222-82kbqs.rb extconf.rb
checking for ruby/util.h... yes
creating Makefile

make "DESTDIR=" clean
Use of uninitialized value in concatenation (.) or string at /ws/sachilig-sjc/new/perl/lib/5.16.3/warnings.pm line 390.
Use of uninitialized value in concatenation (.) or string at /ws/sachilig-sjc/new/perl/lib/5.16.3/warnings.pm line 390.
Use of uninitialized value in concatenation (.) or string at /ws/sachilig-sjc/new/perl/lib/5.16.3/warnings.pm line 390.
Use of uninitialized value in concatenation (.) or string at /ws/sachilig-sjc/new/perl/lib/5.16.3/warnings.pm line 390.
Use of uninitialized value in concatenation (.) or string at /ws/sachilig-sjc/new/perl/lib/5.16.3/warnings.pm line 390.
Use of uninitialized value in concatenation (.) or string at /ws/sachilig-sjc/new/perl/lib/5.16.3/warnings.pm line 390.
Use of uninitialized value in concatenation (.) or string at /ws/sachilig-sjc/new/perl/lib/5.16.3/warnings.pm line 390.
Use of uninitialized value in concatenation (.) or string at /ws/sachilig-sjc/new/perl/lib/5.16.3/warnings.pm line 390.
Use of uninitialized value in pattern match (m//) at /ws/sachilig-sjc/new/perl/lib/5.16.3/warnings.pm line 390.
Argument "UUUUUUUUUUUU" isn't numeric in division (/) at /ws/sachilig-sjc/new/perl/lib/5.16.3/warnings.pm line 390.
Illegal division by zero at /ws/sachilig-sjc/new/perl/lib/5.16.3/warnings.pm line 390.
BEGIN failed--compilation aborted at /ws/sachilig-sjc/new/perl/lib/5.16.3/File/Basename.pm line 52.
Compilation failed in require at /router/bin/make line 37.
BEGIN failed--compilation aborted at /router/bin/make line 37.

make "DESTDIR="
Use of uninitialized value in concatenation (.) or string at /ws/sachilig-sjc/new/perl/lib/5.16.3/warnings.pm line 390.
Use of uninitialized value in concatenation (.) or string at /ws/sachilig-sjc/new/perl/lib/5.16.3/warnings.pm line 390.
Use of uninitialized value in concatenation (.) or string at /ws/sachilig-sjc/new/perl/lib/5.16.3/warnings.pm line 390.
Use of uninitialized value in concatenation (.) or string at /ws/sachilig-sjc/new/perl/lib/5.16.3/warnings.pm line 390.
Use of uninitialized value in concatenation (.) or string at /ws/sachilig-sjc/new/perl/lib/5.16.3/warnings.pm line 390.
Use of uninitialized value in concatenation (.) or string at /ws/sachilig-sjc/new/perl/lib/5.16.3/warnings.pm line 390.
Use of uninitialized value in concatenation (.) or string at /ws/sachilig-sjc/new/perl/lib/5.16.3/warnings.pm line 390.
Use of uninitialized value in concatenation (.) or string at /ws/sachilig-sjc/new/perl/lib/5.16.3/warnings.pm line 390.
Use of uninitialized value in pattern match (m//) at /ws/sachilig-sjc/new/perl/lib/5.16.3/warnings.pm line 390.
Argument "UUUUUUUUUUUU" isn't numeric in division (/) at /ws/sachilig-sjc/new/perl/lib/5.16.3/warnings.pm line 390.
Illegal division by zero at /ws/sachilig-sjc/new/perl/lib/5.16.3/warnings.pm line 390.
BEGIN failed--compilation aborted at /ws/sachilig-sjc/new/perl/lib/5.16.3/File/Basename.pm line 52.
Compilation failed in require at /router/bin/make line 37.
BEGIN failed--compilation aborted at /router/bin/make line 37.

make failed, exit code 255

Gem files will remain installed in /ws/sachilig-sjc/new/ruby/lib/ruby/gems/2.2.0/gems/bcrypt-3.1.7 for inspection.
Results logged to /ws/sachilig-sjc/new/ruby/lib/ruby/gems/2.2.0/extensions/x86_64-linux/2.2.0-static/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.

I believe I had this same problem and I may have solved it using rm -rf Gemfile.lock 我相信我也有同样的问题,我可能已经使用rm -rf Gemfile.lock解决了

, then remove the version information from your Gemfile and then try to run gem install bcrypt see if that works... if so: bundle bundle update if that doesn't work then you have the wrong version of ruby -v or rails -v . ,然后从您的Gemfile中删除版本信息,然后尝试运行gem install bcrypt看看是否可行...如果是这样的话: bundle bundle update如果那不起作用,那么您使用的是错误版本的ruby -vrails -v In which case you may have to rbenv install Ruby then gem install Rails . 在这种情况下,您可能必须先rbenv install Ruby然后再gem install Rails I'm not sure what my exact order of events was for things like that but I kept doing things like this and eventually something gave in. 我不确定事件的确切顺序是什么,但是我一直这样做,最终还是让步了。

By the way your ruby is definitely not the most up to date at 2.2.0 so you probably want to go and install ruby.. https://gorails.com has some stuff. 顺便说一句,您的Ruby绝对不是最新的2.2.0版本,因此您可能想安装Ruby。.https ://gorails.com有一些东西。

It helped me to replace the gem 'bcrypt', '3.1.7' with gem 'bcrypt', '~> 3.1.7' in the Gemfile of my rails application. 它帮助我更换gem 'bcrypt', '3.1.7'gem 'bcrypt', '~> 3.1.7'在我的Rails应用程序的Gemfile中。

The difference is that the bundler can load any gem that varies with the last (minor) number. 区别在于捆绑器可以加载随最后(次要)数字变化的任何宝石。

Then I run bundle install from the command line and it works like miracle. 然后,我从命令行运行bundle install ,它的运行就像奇迹一样。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 安装bcrypt(3.1.11)时发生错误,Bundler无法继续。 - An error occurred while installing bcrypt (3.1.11), and Bundler cannot continue. 安装bcrypt-ruby(3.1.2)时发生错误,并且Bundler无法继续 - An error occurred while installing bcrypt-ruby (3.1.2), and Bundler cannot continue 安装 pg (0.15.1) 时出错,Bundler 无法继续 - An error occurred while installing pg (0.15.1), and Bundler cannot continue 安装pg(0.18.2)时发生错误,并且Bundler无法继续 - An error occurred while installing pg (0.18.2), and Bundler cannot continue 安装ZenTest(4.8.2)时发生错误,并且Bundler无法继续。 - An error occurred while installing ZenTest (4.8.2), and Bundler cannot continue. 安装 pg (0.18.4) 时出错,Bundler 无法继续 - An error occurred while installing pg (0.18.4), and Bundler cannot continue 安装json(1.8.6)时出错,Bundler无法继续 - An error occurred while installing json (1.8.6), and Bundler cannot continue 安装 nokogiri (1.6.0) 时出错,Bundler 无法继续 - An error occurred while installing nokogiri (1.6.0), and Bundler cannot continue 安装rake(10.1.0)时发生错误,Bundler无法继续 - An error occurred while installing rake (10.1.0), and Bundler cannot continue 安装puma(2.11.1)时发生错误,并且Bundler无法继续 - An error occurred while installing puma (2.11.1), and Bundler cannot continue
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM