2014-10-27 202 views
1

我無法安裝bcrypt 我的環境 - Mac Yosemite 10.10,Ruby - 1.9.3 p547,Rails - 3.2.15。 當我運行軟件包安裝時,我越來越像這樣。當我運行軟件包安裝時出現bcrypt gem錯誤

Gem::Ext::BuildError: ERROR: Failed to build gem native extension. 
/Users/mohit/.rvm/rubies/ruby-1.9.3-p547/bin/ruby extconf.rb 
creating Makefile 
make clean 
make 
compiling bcrypt_ext.c 
make: *** [bcrypt_ext.o] Segmentation fault: 11 
make failed, exit code 2 
Gem files will remain installed in /Users/mohit/.rvm/gems/ruby-1.9.3-p547/gems/bcrypt-3.1.9 for inspection. 
Results logged to /Users/mohit/.rvm/gems/ruby-1.9.3-p547/extensions/x86_64-darwin-13/1.9.1/bcrypt-3.1.9/gem_make.out 
An error occurred while installing bcrypt (3.1.9), and Bundler cannot continue. 
Make sure that `gem install bcrypt -v '3.1.9'` succeeds before bundling. 
Like 

這裏是我的Gemfile

source 'https://rubygems.org' 

gem 'rails', '3.2.15' 


# Bundle edge Rails instead: 

# gem 'rails', :git => 'git://github.com/rails/rails.git' 

gem 'sqlite3' 



# Gems used only for assets and not required 

# in production environments by default. 

group :assets do 

    gem 'sass-rails', '~> 3.2.3' 

    gem 'coffee-rails', '~> 3.2.1' 


    # See https://github.com/sstephenson/execjs#readme for more supported runtimes 

    # gem 'therubyracer', :platforms => :ruby 

    gem 'uglifier', '>= 1.0.3' 

end 

    #gem 'devise' 

gem 'jquery-rails' 

gem "sorcery" 

# To use ActiveModel has_secure_password 

    gem 'bcrypt-ruby' 


# To use Jbuilder templates for JSON 

# gem 'jbuilder' 

# Use unicorn as the app server 

# gem 'unicorn' 


# Deploy with Capistrano 

# gem 'capistrano' 


# To use debugger 

# gem 'debugger' 
+0

嘗試'gem install bcrypt',嘗試在Gemfile中更改爲'gem'bcrypt','〜> 3.1.7'',然後運行'bundle install' – bhanu 2014-10-27 15:58:13

+0

根據您發佈在Facebook上的其他信息,問題是重複的... http://stackoverflow.com/questions/25583938/gem-install-rails-fails-with-dns-error – SteveTurczyn 2014-10-27 18:07:13

+0

你設法解決這個問題?我有同樣的問題=>分段錯誤:11 – bootsa 2014-11-21 12:55:40

回答

0

我通過替換gem'bcrypt'而不是gem'bcrypt-ruby'來進行寶石文件的更改,並且進行了捆綁安裝併爲我工作!

0

這裏是我發現,糾正了我的問題時,我遇到了同樣的錯誤:

xcode-select --install 
bundle install 

值得注意的是,我也在優勝美地,但Ruby 2.1.3,Rails 4.1.6。

+0

我得到'xcode-select:錯誤:命令行工具已經安裝,使用「軟件更新」安裝更新程序# – Jankeesvw 2014-10-31 12:37:41

+0

我也是這樣,我不能得到這個工作 – rryter 2014-11-03 14:46:09

+0

做[這個問題]中的步驟(http://stackoverflow.com/questions/26601184/gemextbuilderror-error-failed-to-build-gem-native-extension-bcrypt-ruby)有幫助嗎? – BigGillyStyle 2014-11-04 16:35:49

-1

最後我想通過從rubygems.org複製bcrypt的確切單詞,然後對名稱進行了細微的更改,然後我做了bundle install並且它工作。

+1

如果你在這裏給出了確切的解決方案,而不是「談論它」,這可能會有所幫助......正如現在的文字,這個答案對其他人毫無價值。 – 2015-02-18 16:13:49

相關問題