Docker + rails 4 :, strange error during: RUN bundle exec rake assets: precompile

trying to deploy rails4 application using Docker, I have the following Docker file:

FROM ubuntu:14.04 RUN apt-get update && \ apt-get install -qy software-properties-common RUN apt-add-repository -y ppa:brightbox/ruby-ng RUN apt-get update && apt-get upgrade -y # Ruby and dependencies RUN apt-get install -qy curl nodejs libmysqlclient-dev libsqlite3-dev libpq-dev build-essential \ ruby2.2 ruby2.2-dev RUN gem install bundler --no-ri --no-rdoc # Cache bundle install WORKDIR /tmp ADD Gemfile Gemfile ADD Gemfile.lock Gemfile.lock RUN bundle install --without development test # Add rails project to project directory ADD ./ /rails # set WORKDIR WORKDIR /rails RUN bundle exec rake assets:precompile # Cleanup RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* # Publish port 8080 EXPOSE 8080 

and in my docker-compose.ml my service is defined in such a way that it builds it using this Dockerfile

 .... web: build: . .... 

But the assembly does not work:

 service 'web' failed to build: The command '/bin/sh -c bundle exec rake assets:precompile' returned a non-zero code: 1 

according to the console, error:

  ---> Running in 32c12f52e507 /var/lib/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/spec_set.rb:92:in `block in materialize': Could not find debug_inspector-0.0.2 in any of the sources (Bundler::GemNotFound) 

I added a gem to the gemfile,

 gem 'debug_inspector', '~> 0.0.2' 

I connected it and rebuilt .., now another error occurs for another missing stone:

 var/lib/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/spec_set.rb:92:in `block in materialize': Could not find binding_of_caller-0.7.2 in any of the sources (Bundler::GemNotFound) 

I do not understand what is going on. What did I forget to avoid such repeated errors?

thanks for the help

+4
source share
1 answer

I changed in my Dockerfle

  RUN bundle install --without development test 

to

 RUN bundle install 

these gems are required by the development environment ...

+1
source

All Articles