Я пытаюсь настроить приложение rails для запуска с помощью Docker.Он продолжает падать с Could not find rake-12.3.2 in any of the sources (Bundler::GemNotFound)
Dockerfile
FROM ruby:2.6.1
RUN apt-get update -yqq && \
apt-get install -yqq --no-install-recommends \
nodejs \
nano
COPY Gemfile* /usr/src/app/
WORKDIR /usr/src/app
RUN bundle install
RUN gem install foreman
RUN gem install rake -v 12.3.2
COPY . /usr/src/app/
CMD [ "bin/rails", "s", "-b", "0.0.0.0" ]
.docker-compose.yml
version: '3'
services:
postgres:
image: 'postgres:10.3-alpine'
volumes:
- 'postgres:/var/lib/postgresql/data'
env_file:
- '.env'
redis:
image: 'redis:4.0-alpine'
command: redis-server --requirepass yourpassword
volumes:
- 'redis:/data'
rails:
depends_on:
- 'postgres'
- 'redis'
build: .
ports:
- '3000:3000'
volumes:
- '.:/usr/src/app'
env_file:
- '.env'
volumes:
redis:
postgres:
config / boot.rb
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
require 'bundler/setup' # Set up gems listed in the Gemfile.
require 'bootsnap/setup' if RUBY_PLATFORM =~ /darwin/
log
rails_1 | /usr/local/lib/ruby/site_ruby/2.6.0/bundler/spec_set.rb:91:in `block in materialize': Could not find rake-12.3.2 in any of the sources (Bundler::GemNotFound)
rails_1 | from /usr/local/lib/ruby/site_ruby/2.6.0/bundler/spec_set.rb:85:in `map!'
rails_1 | from /usr/local/lib/ruby/site_ruby/2.6.0/bundler/spec_set.rb:85:in `materialize'
rails_1 | from /usr/local/lib/ruby/site_ruby/2.6.0/bundler/definition.rb:170:in `specs'
rails_1 | from /usr/local/lib/ruby/site_ruby/2.6.0/bundler/definition.rb:237:in `specs_for'
rails_1 | from /usr/local/lib/ruby/site_ruby/2.6.0/bundler/definition.rb:226:in `requested_specs'
rails_1 | from /usr/local/lib/ruby/site_ruby/2.6.0/bundler/runtime.rb:108:in `block in definition_method'
rails_1 | from /usr/local/lib/ruby/site_ruby/2.6.0/bundler/runtime.rb:20:in `setup'
rails_1 | from /usr/local/lib/ruby/site_ruby/2.6.0/bundler.rb:107:in `setup'
rails_1 | from /usr/local/lib/ruby/site_ruby/2.6.0/bundler/setup.rb:20:in `<top (required)>'
rails_1 | from /usr/local/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
rails_1 | from /usr/local/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
rails_1 | from /usr/src/app/config/boot.rb:3:in `<top (required)>'
rails_1 | from bin/rails:3:in `require_relative'
rails_1 | from bin/rails:3:in `<main>'