簡體   English   中英

當我運行捆綁安裝時,bcrypt gem出現錯誤

[英]When I run bundle install i'm getting error with bcrypt gem

我無法安裝bcrypt我的環境-Mac Yosemite 10.10,Ruby-1.9.3 p547,Rails-3.2.15。 當我運行捆綁安裝時,我會得到這樣的提示。

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

這是我的寶石文件

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'

這是當我遇到相同的錯誤時發現糾正了我的問題的內容:

xcode-select --install
bundle install

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

我通過替換gem'bcrypt'而不是gem'bcrypt-ruby'對gem文件進行了更改,並捆綁安裝並為我工作!

最后,我通過從rubygems.org復制bcrypt的確切字詞來弄清楚了,然后對名稱進行了些許更改,然后我進行了bundle install並奏效了。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM