我在项目中安装了gem'devise'。这样做之后,我尝试迁移数据库。但是,由于“无法在任何源中找到bcrypt-3.1.12”,这似乎停止了。它告诉我再次运行捆绑安装,这似乎不起作用。我不得不提到该项目正在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]
答案 0 :(得分:1)
通过重建docker服务可以解决问题
docker-compose --build app