bcrypt-ruby 不会与捆绑器一起安装,但与 gem install 一起安装时可以正常工作
我最近开始遇到捆绑程序的问题 - 在进行捆绑安装或 sudo 捆绑安装时,bcrypt-ruby 将不会安装,并退出并出现以下错误:
Installing bcrypt-ruby (2.1.4) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby1.8 extconf.rb
Gem files will remain installed in /home/deploy/vendor/bundle/ruby/1.8/gems/bcrypt-ruby-2.1.4 for inspection.
Results logged to /home/deploy/vendor/bundle/ruby/1.8/gems/bcrypt-ruby-2.1.4/ext/mri/gem_make.out
An error occured while installing bcrypt-ruby (2.1.4), and Bundler cannot continue.
Make sure that `gem install bcrypt-ruby -v '2.1.4'` succeeds before bundling.
但是,gem install bcrypt-ruby -v '2.1.4' 运行得很好(事实上已经在这个盒子上运行过)。手动运行
/usr/bin/ruby1.8 extconf.rb
效果很好,生成的 Makefile 也可以使用 make 运行得很好。
我在 Ubuntu 10.04.1 LTS 上使用 Ruby 1.8.7 和捆绑器 1.0.21。其他宝石似乎通过捆绑器工作得很好。虽然这可能是显而易见的,但我已经确认 ruby-dev、gcc 等软件包已安装。我尝试过将 --deployment 选项与捆绑器一起使用,但没有任何不同的行为。我认为最近发生的唯一变化是我几天前进行了捆绑包更新,因此捆绑包进行了次要版本更改(1.0.10 -> 1.0.21),而 bcrypt 似乎进行了主要版本更改( 2.1.4→3.0.1)。
任何帮助表示赞赏!
I just recently began having trouble with bundler - bcrypt-ruby will not install when doing a bundle install or sudo bundle install and exits with the following error:
Installing bcrypt-ruby (2.1.4) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby1.8 extconf.rb
Gem files will remain installed in /home/deploy/vendor/bundle/ruby/1.8/gems/bcrypt-ruby-2.1.4 for inspection.
Results logged to /home/deploy/vendor/bundle/ruby/1.8/gems/bcrypt-ruby-2.1.4/ext/mri/gem_make.out
An error occured while installing bcrypt-ruby (2.1.4), and Bundler cannot continue.
Make sure that `gem install bcrypt-ruby -v '2.1.4'` succeeds before bundling.
However, gem install bcrypt-ruby -v '2.1.4'
runs just fine (and in fact has already been run on this box). Running /usr/bin/ruby1.8 extconf.rb
manually works just fine, and the resulting Makefile also runs with make just fine.
I'm using Ruby 1.8.7 and bundler 1.0.21 on Ubuntu 10.04.1 LTS. Other gems seem to be working fine through bundler. Though this is probably obvious, I've confirmed that the ruby-dev, gcc, etc packages are installed. I've tried using the --deployment option with bundler with no different behavior. The only thing I can think that has changed recently is I did a bundle update a couple days ago, so bundle got a minor version change (1.0.10 -> 1.0.21) and bcrypt appears to have gotten a major version change (2.1.4 -> 3.0.1).
Any help is appreciated!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您安装 Ruby 1.9.2 后是否已升级到 Lion?如果是这样,它可能链接到了错误的 gcc。
尝试卸载并重新安装 1.9.2,我建议使用 rvm
如果这不起作用,您可能必须内爆 rvm
Have you upgraded to Lion since you installed Ruby 1.9.2? If so it is probably linked to the wrong gcc.
Try uninstalling and reinstalling 1.9.2, I would suggest using rvm
If that does not work you might have to implode rvm
尝试:
try: