简体   繁体   English

安装bcrypt(3.1.11)时发生错误,Bundler无法继续。

[英]An error occurred while installing bcrypt (3.1.11), and Bundler cannot continue.

I tried to deploy my project with using capistrano, but it was not working. 我尝试使用capistrano部署我的项目,但它无法正常工作。

the error says, 错误说,

 An error occurred while installing bcrypt (3.1.11), and Bundler cannot
 continue. Make sure that `gem install bcrypt -v '3.1.11'` succeeds
 before bundling.

Here is my error. 这是我的错误。

INFO [c11e0369] Running $HOME/.rbenv/bin/rbenv exec bundle install --path /var/www/peace/shared/bundle --without development test --deployment --quiet as ec2-user@52.193.101.5
DEBUG [c11e0369] Command: cd /var/www/peace/releases/20160511092524 && ( export RBENV_ROOT="$HOME/.rbenv" RBENV_VERSION="2.1.7" ; $HOME/.rbenv/bin/rbenv exec bundle install --path /var/www/peace/shared/bundle --without development test --deployment --quiet )
DEBUG [c11e0369]    An error occurred while installing bcrypt (3.1.11), and Bundler cannot continue.
Make sure that `gem install bcrypt -v '3.1.11'` succeeds before bundling.
(Backtrace restricted to imported tasks)
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as ec2-user@52.193.101.5: bundle exit status: 5
bundle stdout: An error occurred while installing bcrypt (3.1.11), and Bundler cannot continue.
Make sure that `gem install bcrypt -v '3.1.11'` succeeds before bundling.
bundle stderr: Nothing written

I don't have bcript in my gem file. 我的宝石文件中没有bcript。 Here is my Gem file 这是我的Gem文件

source 'https://rubygems.org'


# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.0'
# Use sqlite3 as the database for Active Record
group :development, :test do
  gem 'sqlite3'
end



group :production do
  gem 'mysql2', '~> 0.3.20'
end

# Use SCSS for stylesheets
gem 'bootstrap-datetimepicker-rails'
gem 'bootstrap-timepicker-rails'
gem 'awesome_nested_fields'
gem 'sass-rails', '~> 5.0'
gem 'kaminari'
gem 'whenever', require: false
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.1.0'
gem 'google-analytics-rails'
gem 'sitemap_generator'
gem 'rails-i18n'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
#gem 'therubyracer', platforms: :ruby
gem 'rails_admin'
gem 'rails_admin_tag_list'#, :git => 'git://github.com/imouaddine/rails_admin_tag_list.git', :ref => 'a9a4e31af6fdd2124110d0dff81ab97950803e65'
gem 'devise'
gem 'omniauth-twitter'
gem 'omniauth-facebook'
gem 'font-awesome-rails'
gem 'jqplot-rails'
gem 'ransack'
gem 'mail_form'
gem 'simple_form'
gem 'redis', '3.2.2'
gem 'streamio-ffmpeg'


group :production, :staging do

    gem 'unicorn'

end

group :development do
  gem 'capistrano', '~> 3.4.0'
  gem 'capistrano-rails',   '~> 1.1', require: false
  gem 'capistrano-bundler', '~> 1.1', require: false
  gem 'capistrano-rbenv', '~> 2.0', require: false
  gem 'capistrano3-unicorn'
end



# SEO
gem 'meta-tags', :require => 'meta_tags'

gem 'acts-as-taggable-on', '~> 3.4'

gem 'carrierwave'
gem 'rmagick'
gem 'fog'
# Use jquery as the JavaScript library
gem 'jquery-rails'
gem 'jquery-ui-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
gem 'jquery-turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc

# Use ActiveModel has_secure_password


# Use Unicorn as the app server
# gem 'unicorn'

# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development

group :development, :test do
  # Call 'byebug' anywhere in the code to stop execution and get a debugger console
  gem 'byebug'
  gem 'pry'
  gem 'pry-doc'
  gem 'pry-byebug'
  gem 'pry-rails'
  gem 'awesome_print'
  gem 'bullet'

  # Access an IRB console on exception pages or by using <%= console %> in views
  gem 'web-console', '~> 2.0'

  # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
  gem 'spring'


end

Does anyone know how can I solve this? 有谁知道我怎么解决这个问题?

Thanks 谢谢

sudo apt-get install ruby-dev 

救了我

bcrypt is dependant on gmp library. bcrypt依赖于gmp库。

On Ubuntu install the libgmp-dev package 在Ubuntu上安装libgmp-dev

sudo apt-get install libgmp-dev

On Cent OS, install the libgmp-devel package 在Cent OS上,安装libgmp-devel软件包

sudo yum install libgmp-devel

尝试将此行添加到您的Gemfile gem'bcrypt gem 'bcrypt', '~> 3.1', '>= 3.1.10'并运行bundle install

adding 加入

gem 'bcrypt', '~> 3.1.7'

into your Gemfile and delete your Gemlockfile, 进入你的Gemfile并删除你的Gemlockfile,

then run 然后运行

bundle install

It says you are not able to use libgmp-devel.(it was written by Japanese,so I translated). 它说你无法使用libgmp-devel。(它是由日语写的,所以我翻译了)。 I am using Amazon Linux as server. 我使用Amazon Linux作为服务器。

Amazon Linux is based on CentOS so you can use yum command and libgmp-devel library. Amazon Linux基于CentOS,因此您可以使用yum命令和libgmp-devel库。

On mac OSx try this. 在mac OSx上尝试这个。 gem brew install gmp . gem brew install gmp

暂无
暂无

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

相关问题 安装 json (1.7.6) 时出错,Bundler 无法继续。 - An error occurred while installing json (1.7.6), and Bundler cannot continue. 安装ZenTest(4.8.2)时发生错误,并且Bundler无法继续。 - An error occurred while installing ZenTest (4.8.2), and Bundler cannot continue. 安装bcrypt 3.1.7时发生错误,捆绑器无法继续 - An error occurred while installing bcrypt 3.1.7 and bundler cannot continue 如何解决&#39;安装rake(10.5.0)时出错,而Bundler无法继续。&#39; 错误 - How to fix 'An error occurred while installing rake (10.5.0), and Bundler cannot continue.' error Rails教程:“安装ffi(1.9.10)时发生错误,并且Bundler无法继续。” - Rails tutorial: “An error occurred while installing ffi (1.9.10), and Bundler cannot continue.” 安装json(1.8.3)时出错,Bundler无法继续。 在 Ubuntu 上 - An error occurred while installing json (1.8.3), and Bundler cannot continue. on Ubuntu 安装racc(1.6.2)时出错,Bundler无法继续。 (Macbook Air M1) - An error occurred while installing racc (1.6.2), and Bundler cannot continue. (Macbook Air M1) 安装机架(2.0.1)时发生错误,并且Bundler无法继续。 捆绑前,请确保`gem install rack -v&#39;2.0.1&#39;`成功 - An error occurred while installing rack (2.0.1), and Bundler cannot continue. Make sure that `gem install rack -v '2.0.1'` succeeds before bundling 安装调试器时出错(1.6.8),Bundler无法继续。 确保`gem install debugger -v&#39;1.6.8&#39;` - Error occurred while installing debugger (1.6.8), and Bundler cannot continue. Make sure that `gem install debugger -v '1.6.8'` 安装bcrypt-ruby(3.1.2)时发生错误,并且Bundler无法继续 - An error occurred while installing bcrypt-ruby (3.1.2), and Bundler cannot continue
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM