繁体   English   中英

bcrypt-ruby无法构建gem本机扩展

[英]bcrypt-ruby failed to build gem native extension

我是RoR的新手,在跟随RailsTutorial.org时安装bcrypt-ruby(v 3.0.1)gem(来自gemfile)时遇到了麻烦。 在浏览网站上的其他响应时,我不清楚这是版本不兼容问题,缺少的ruby-dev环境,与Xcode有关,在“ ruby​​ extconf.rb”中是否有多余空间或其他原因。 任何建议将不胜感激。 谢谢。

我的环境= OS X v 10.8,Ruby 1.9.3p194和Rails 3.2.6。

tj$ bundle install  
Fetching gem metadata from https://rubygems.org/........  
Using rake (0.9.2.2)   
Using i18n (0.6.0)  
Using multi_json (1.3.6)  
Using activesupport (3.2.6)  
Using builder (3.0.0)   
Using activemodel (3.2.6)   
Using erubis (2.7.0)  
Using journey (1.0.4)   
Using rack (1.4.1)   
Using rack-cache (1.2)   
Using rack-test (0.6.1)   
Using hike (1.2.1)   
Using tilt (1.3.3)   
Using sprockets (2.1.3)   
Using actionpack (3.2.6)   
Using mime-types (1.19)   
Using polyglot (0.3.3)   
Using treetop (1.4.10)   
Using mail (2.4.4)  
Using actionmailer (3.2.6)   
Using arel (3.0.2)   
Using tzinfo (0.3.33)   
Using activerecord (3.2.6)   
Using activeresource (3.2.6)   
Using addressable (2.3.1)  
Using annotate (2.5.0) 

Installing bcrypt-ruby (3.0.1) with native extensions 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

        /Users/tj/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb 
creating Makefile

make
sh: make: command not found

Gem files will remain installed in /Users/tj/.rvm/gems/ruby-1.9.3-    p194@rails3tutorial2ndEd/gems/bcrypt-ruby-3.0.1 for inspection.  
Results logged to /Users/tj/.rvm/gems/ruby-1.9.3-p194@rails3tutorial2ndEd/gems/bcrypt-    ruby-3.0.1/ext/mri/gem_make.out  
An error occured while installing bcrypt-ruby (3.0.1), and Bundler cannot continue.
Make sure that `gem install bcrypt-ruby -v '3.0.1'` succeeds before bundling.

在我看来,您的系统没有make 如果您使用的是Mac,则需要安装Xcode命令行工具。

暂无
暂无

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM