I'm not able to install bcrypt My environment - Mac Yosemite 10.10, Ruby - 1.9.3 p547, Rails - 3.2.15. When I run bundle install i'm getting like this.
我无法安装bcrypt我的环境 - Mac Yosemite 10.10,Ruby - 1.9.3 p547,Rails - 3.2.15。当我运行bundle install时,我会这样。
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
Here is my Gemfile
这是我的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'
3 个解决方案
#1
0
Here's what I found that corrected my problem when I encountered the same error:
这是我发现的,当我遇到相同的错误时纠正了我的问题:
xcode-select --install
bundle install
Of note, I'm also on Yosemite but Ruby 2.1.3, Rails 4.1.6.
值得注意的是,我也在优胜美地,但Ruby 2.1.3,Rails 4.1.6。
#2
0
I made changes in the gem file by replacing gem 'bcrypt' instead of gem 'bcrypt-ruby' and did bundle install and worked for me!!
我通过替换gem'bcrypt'代替gem'bcrypt-ruby'来更改gem文件,并进行了bundle install并为我工作!!
#3
-1
Finally I figured it out by copying the exact word of the bcrypt from the rubygems.org, then made slight changes in name, and then I did bundle install
and it worked.
最后,我通过从rubygems.org复制bcrypt的确切单词来解决这个问题,然后对名称进行了细微的更改,然后我进行了捆绑安装并且工作正常。
#1
0
Here's what I found that corrected my problem when I encountered the same error:
这是我发现的,当我遇到相同的错误时纠正了我的问题:
xcode-select --install
bundle install
Of note, I'm also on Yosemite but Ruby 2.1.3, Rails 4.1.6.
值得注意的是,我也在优胜美地,但Ruby 2.1.3,Rails 4.1.6。
#2
0
I made changes in the gem file by replacing gem 'bcrypt' instead of gem 'bcrypt-ruby' and did bundle install and worked for me!!
我通过替换gem'bcrypt'代替gem'bcrypt-ruby'来更改gem文件,并进行了bundle install并为我工作!!
#3
-1
Finally I figured it out by copying the exact word of the bcrypt from the rubygems.org, then made slight changes in name, and then I did bundle install
and it worked.
最后,我通过从rubygems.org复制bcrypt的确切单词来解决这个问题,然后对名称进行了细微的更改,然后我进行了捆绑安装并且工作正常。