Ruby on rails 在任何源中都找不到bcrypt-3.1.12

Ruby on rails 在任何源中都找不到bcrypt-3.1.12,ruby-on-rails,ruby,bcrypt,Ruby On Rails,Ruby,Bcrypt,我在我的项目中安装了gem“design”。这样做之后,我尝试迁移数据库;然而,由于“在任何来源中都找不到bcrypt-3.1.12”,这似乎停止了。它告诉我再次运行bundle安装,这似乎不起作用。我必须提到这个项目是在docker上运行的 我尝试卸载gem并再次安装,同时删除gemfile.lock文件。这些措施也失败了 source 'https://rubygems.org' git_source(:github) do |repo_name| repo_name = "#{rep

我在我的项目中安装了gem“design”。这样做之后,我尝试迁移数据库;然而,由于“在任何来源中都找不到bcrypt-3.1.12”,这似乎停止了。它告诉我再次运行bundle安装,这似乎不起作用。我必须提到这个项目是在docker上运行的

我尝试卸载gem并再次安装,同时删除gemfile.lock文件。这些措施也失败了

source 'https://rubygems.org'

git_source(:github) do |repo_name|
  repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
  "https://github.com/#{repo_name}.git"
end

gem 'rails', '~> 5.0.7', '>= 5.0.7.1'
gem 'mysql2', '>= 0.3.18', '< 0.6.0'
gem 'devise'
gem 'puma', '~> 3.0'
gem 'jbuilder', '~> 2.5'
gem 'bcrypt', platforms: :ruby

group :development, :test do
  # Call 'byebug' anywhere in the code to stop execution and get a debugger console
  gem 'byebug', platform: :mri
end

group :development do
  gem 'listen', '~> 3.0.5'
  # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
  gem 'spring'
  gem 'spring-watcher-listen', '~> 2.0.0'
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
源代码'https://rubygems.org'
git_源(:github)do | repo_名称|
repo_name=“#{repo_name}/#{repo_name}”除非repo_name.include?(“/”)
"https://github.com/#{repo_name}.git“
结束
gem'rails','~>5.0.7','>=5.0.7.1'
gem'mysql2','>=0.3.18','<0.6.0'
宝石“设计”
宝石“彪马”,“~>3.0”
gem'jbuilder',“~>2.5”
gem'bcrypt',platforms::ruby
小组:开发,:测试
#在代码中的任意位置调用“byebug”以停止执行并获得调试器控制台
gem'byebug',平台::mri
结束
小组:发展怎么办
gem'听',“~>3.0.5”
#Spring通过让应用程序在后台运行来加速开发。阅读更多:https://github.com/rails/spring
宝石“春天”
gem‘SpringWatcherListen’,“~>2.0.0”
结束
#Windows不包括zoneinfo文件,因此捆绑tzinfo数据
gem'tzinfo data',平台:[:mingw,:mswin,:x64_mingw,:jruby]

问题通过重建docker服务得到解决


docker compose——构建应用程序

您的捆绑包版本和ruby版本是什么
bundle-v
将告诉您nobundle版本是1.16.5,ruby版本是2.4.4,只需删除
platforms::ruby
语句并重试。我删除了它并运行了bundle安装和bundle更新,但当我尝试迁移时,我得到了相同的错误
gem install bcrypt