Skip to content
This repository has been archived by the owner on Mar 27, 2022. It is now read-only.

Missing Gemfile.lock on upgrade to 4.4.0 #478

Closed
metaxy opened this issue Apr 20, 2015 · 17 comments
Closed

Missing Gemfile.lock on upgrade to 4.4.0 #478

metaxy opened this issue Apr 20, 2015 · 17 comments
Assignees
Labels

Comments

@metaxy
Copy link
Contributor

metaxy commented Apr 20, 2015

I am using docker on debian (kernel is 3.16.3).

When runinng docker build -t onebody . it fails with the following error:
Step 15 : ADD Gemfile /var/www/onebody/Gemfile ---> e808ee16f6d3 Removing intermediate container 7445753f8546 Step 16 : ADD Gemfile.lock /var/www/onebody/Gemfile.lock 2015/04/20 14:35:42 Gemfile.lock: no such file or directory

@cessien
Copy link
Contributor

cessien commented Apr 20, 2015

hmm was your bundle install successful?

@metaxy
Copy link
Contributor Author

metaxy commented Apr 20, 2015

i am upgrading on my own linux box.

when do i have to run bundle install? I am following the instructions on
https://github.com/churchio/onebody/wiki/Installation-with-Docker#upgrading-onebody

Am Montag, 20. April 2015 schrieb Charles Essien :

hmm was your bundle install successful?

are you upgrading via digital ocean or you own linux box?


Reply to this email directly or view it on GitHub
#478 (comment).

Die Gnade sei mit all denen, die unseren Herrn Jesu Christus lieben in
Unvergänglichkeit! (Epheser 6:24)

@cessien
Copy link
Contributor

cessien commented Apr 20, 2015

I believe its version specific for this release, before building

check this out
https://github.com/churchio/onebody/wiki/Manual-Installation#version-specific-upgrade-information

@metaxy
Copy link
Contributor Author

metaxy commented Apr 20, 2015

When do i have to execute this commands? Before i build the docker image?
Or after?

2015-04-20 15:53 GMT+02:00 Charles Essien notifications@github.com:

I believe its version specific for this release, before building

check this out

https://github.com/churchio/onebody/wiki/Manual-Installation#version-specific-upgrade-information


Reply to this email directly or view it on GitHub
#478 (comment).

Die Gnade sei mit all denen, die unseren Herrn Jesu Christus lieben in
Unvergänglichkeit! (Epheser 6:24)

@seven1m
Copy link
Owner

seven1m commented Apr 20, 2015

This is a bug in the Dockerfile. Sorry. You can remove the ADD Gemfile.lock line and it might work.

@cessien
Copy link
Contributor

cessien commented Apr 20, 2015

@seven1m I was wondering if it was necessary.
@metaxy before building the image

@metaxy
Copy link
Contributor Author

metaxy commented Apr 20, 2015

@cessien I dont't understand. Is it somewhere documented how to this?
I assume i have to execute bundle inside the docker image. But how can i do this before running docker build?
Could you provide some more detailed information how to do this?

@seven1m When i remove "ADD Gemfile.lock" i get the following log

Sending build context to Docker daemon 6.414 MB
Sending build context to Docker daemon 
Step 0 : FROM ubuntu:14.04
 ---> 5506de2b643b
Step 1 : RUN apt-get update
 ---> Using cache
 ---> c33ced8977e8
Step 2 : RUN apt-get install -y -q wget vim build-essential curl libreadline-dev libcurl4-openssl-dev nodejs git libmysqlclient-dev imagemagick mysql-client
 ---> Using cache
 ---> 72f604803c88
Step 3 : RUN apt-get clean
 ---> Using cache
 ---> 552c7c093002
Step 4 : RUN apt-get install -y software-properties-common
 ---> Using cache
 ---> 0cb7f68d651f
Step 5 : RUN apt-add-repository -y ppa:brightbox/ruby-ng
 ---> Using cache
 ---> 0cb884f895d9
Step 6 : RUN apt-get update
 ---> Using cache
 ---> d354a612d1ed
Step 7 : RUN apt-get install -y ruby2.1 ruby2.1-dev
 ---> Using cache
 ---> 39629e66dd57
Step 8 : RUN gem install bundler --no-rdoc --no-ri
 ---> Using cache
 ---> 7dd024c5f064
Step 9 : RUN adduser --gecos "" --disabled-password --home=/home/onebody onebody
 ---> Using cache
 ---> ecd6de8c12ff
Step 10 : USER onebody
 ---> Using cache
 ---> 229c8f7fa09f
Step 11 : ENV HOME /home/onebody
 ---> Using cache
 ---> 49417a3b2899
Step 12 : ENV GEM_HOME /home/onebody/.gems
 ---> Using cache
 ---> 3b3bc442d1a9
Step 13 : ENV RAILS_ENV production
 ---> Using cache
 ---> 64ae65aa143c
Step 14 : ADD .ruby-version /var/www/onebody/.ruby-version
 ---> Using cache
 ---> 3c8d46dd001e
Step 15 : ADD Gemfile /var/www/onebody/Gemfile
 ---> Using cache
 ---> bf4e337370c1
Step 16 : USER root
 ---> Using cache
 ---> 3419be915878
Step 17 : RUN chown -R onebody /var/www/onebody
 ---> Using cache
 ---> 0fd2f3e21a74
Step 18 : USER onebody
 ---> Using cache
 ---> 2afd850bcbde
Step 19 : WORKDIR /var/www/onebody
 ---> Using cache
 ---> 9c8899c1d632
Step 20 : RUN bundle install
 ---> Using cache
 ---> d46a877ffec1
Step 21 : RUN gem install thin --no-rdoc --no-ri
 ---> Using cache
 ---> 5458771670d1
Step 22 : USER root
 ---> Using cache
 ---> b01723dbdef5
Step 23 : ADD . /var/www/onebody
 ---> ce50a6372e0e
Removing intermediate container fa7d346f9a5f
Step 24 : RUN chown -R onebody /var/www/onebody
 ---> Running in 7a2f78fb6836
 ---> c0bd645fe8ad
Removing intermediate container 7a2f78fb6836
Step 25 : RUN echo "ALL ALL=NOPASSWD: /var/www/onebody/script/docker/chown_data" > /etc/sudoers.d/chown_data
 ---> Running in 7fb96e6eceff
 ---> 5c723f99bb5a
Removing intermediate container 7fb96e6eceff
Step 26 : RUN echo "#!/bin/bash\n\n/var/www/onebody/script/docker/server \$@"  > /server  && chmod +x /server
 ---> Running in 93e9bf5c8508
 ---> 36ce0a8f6e66
Removing intermediate container 93e9bf5c8508
Step 27 : RUN echo "#!/bin/bash\n\n/var/www/onebody/script/docker/console \$@" > /console && chmod +x /console
 ---> Running in aecfd327d304
 ---> 59b05052cf21
Removing intermediate container aecfd327d304
Step 28 : USER onebody
 ---> Running in 1987b3880c2d
 ---> 93b4fa0a16e8
Removing intermediate container 1987b3880c2d
Step 29 : WORKDIR /var/www/onebody
 ---> Running in 1dfe11352187
 ---> 80cd1588e4a3
Removing intermediate container 1dfe11352187
Step 30 : RUN bundle exec rake assets:precompile
 ---> Running in 96ac2d5205d5
/var/lib/gems/2.1.0/gems/bundler-1.9.4/lib/bundler/resolver.rb:328:in `block in verify_gemfile_dependencies_are_found!': Could not find gem 'mysql2 (~> 0.3.17) ruby' in any of the gem sources listed in your Gemfile or installed on this machine. (Bundler::GemNotFound)
        from /var/lib/gems/2.1.0/gems/bundler-1.9.4/lib/bundler/resolver.rb:307:in `each'
        from /var/lib/gems/2.1.0/gems/bundler-1.9.4/lib/bundler/resolver.rb:307:in `verify_gemfile_dependencies_are_found!'
        from /var/lib/gems/2.1.0/gems/bundler-1.9.4/lib/bundler/resolver.rb:199:in `start'
        from /var/lib/gems/2.1.0/gems/bundler-1.9.4/lib/bundler/resolver.rb:182:in `resolve'
        from /var/lib/gems/2.1.0/gems/bundler-1.9.4/lib/bundler/definition.rb:193:in `resolve'
        from /var/lib/gems/2.1.0/gems/bundler-1.9.4/lib/bundler/definition.rb:132:in `specs'
        from /var/lib/gems/2.1.0/gems/bundler-1.9.4/lib/bundler/definition.rb:177:in `specs_for'
        from /var/lib/gems/2.1.0/gems/bundler-1.9.4/lib/bundler/definition.rb:166:in `requested_specs'
        from /var/lib/gems/2.1.0/gems/bundler-1.9.4/lib/bundler/environment.rb:18:in `requested_specs'
        from /var/lib/gems/2.1.0/gems/bundler-1.9.4/lib/bundler/runtime.rb:13:in `setup'
        from /var/lib/gems/2.1.0/gems/bundler-1.9.4/lib/bundler.rb:122:in `setup'
        from /var/lib/gems/2.1.0/gems/bundler-1.9.4/lib/bundler/setup.rb:18:in `<top (required)>'
        from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
2015/04/20 20:31:58 The command [/bin/sh -c bundle exec rake assets:precompile] returned a non-zero code: 1

@seven1m
Copy link
Owner

seven1m commented Apr 20, 2015

@metaxy thanks for trying. I'll need to play around with it myself to see what needs to be fixed. Sorry about that!

@hschin
Copy link

hschin commented Apr 27, 2015

I ran into the same issue trying to upgrade from 3.3.0 to 3.4.0. Failed at rake assets:precompile with the same error.

@seven1m
Copy link
Owner

seven1m commented Apr 27, 2015

So sorry guys -- been busy with family stuff. I'll try to take a look at this issue this evening.

@Jolg42
Copy link

Jolg42 commented Apr 27, 2015

I wanted to try the new version of OneBody so I tried the DO Install and boum Internal Server Error from the installer.
So I just did the Docker install with the 3.4 & master branch and it's not working neither :/

$ script/docker/bootstrap

Step 16 : ADD Gemfile.lock /var/www/onebody/Gemfile.lock
time="2015-04-27T17:27:08-04:00" level=info msg="Gemfile.lock: no such file or directory"

Then
$ docker run -t -i --rm --link onebody-data:db -v /var/data/onebody/files:/data onebody rake db:seed

Unable to find image 'onebody:latest' locally
Pulling repository onebody
FATA[0001] Error: image library/onebody:latest not found

$ docker ps

CONTAINER ID        IMAGE                       COMMAND                CREATED             STATUS              PORTS                      NAMES
da2c0193cabc        paintedfox/mariadb:latest   "/sbin/my_init -- /s   7 minutes ago       Up 7 minutes        127.0.0.1:3306->3306/tcp   onebody-data

$ docker images

REPOSITORY           TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
<none>               <none>              d21086e3a338        7 minutes ago       612.2 MB
ubuntu               14.04               b7cf8f0d9e82        5 days ago          188.3 MB
paintedfox/mariadb   latest              97b9f9cc2abb        11 months ago       544.7 MB

On Digital Ocean with Ubuntu Docker 1.6.0 on 14.04

@cessien
Copy link
Contributor

cessien commented Apr 27, 2015

now @Jolg42, youre getting the error message 'Unable to find image 'onebody:latest' locally' because your docker image errored out and never finished building

https://github.com/churchio/onebody/blob/master/Dockerfile#L33
could your try running removing this line from your Dockerfile then run docker rmi d21086e3a338

then re-run the bootstrap?

@cessien
Copy link
Contributor

cessien commented Apr 27, 2015

@hschin could you try adding RUN gem install mysql2 right after the RUN bundle install line in your docker file then retry?

@seven1m seven1m added the bug label Apr 28, 2015
@seven1m seven1m self-assigned this Apr 28, 2015
@hschin
Copy link

hschin commented Apr 28, 2015

@cessien thanks. now the build is successful but i get an error when i try to run the worker with docker run --name="worker" -d --link onebody-data:db -v /var/data/onebody/files:/data onebody /worker -c -e production

2015/04/28 00:07:31 Error response from daemon: Cannot start container 6918d3f27bb9a11782c3ae2c47e9ecb681052facecacebf70f254691e1531c2b: exec: "/worker": stat /worker: no such file or directory

@seven1m
Copy link
Owner

seven1m commented Apr 28, 2015

@hschin @Jolg42 @metaxy this should be fixed now.

To upgrade, you'll need to go with the master branch (for now). If this works I'll cut a release and bless it as 3.4.1.

cd onebody
git fetch origin
git checkout master
git pull
docker stop server
docker stop worker
docker stop onebody-data
docker build -t onebody .
docker start onebody-data
docker run -t -i --rm --link onebody-data:db onebody bundle exec rake db:migrate
docker rm server
docker run --name="server" -d --link onebody-data:db -v /var/data/onebody/files:/data -p 80:3000 onebody /server
docker rm worker

Edit: removed the worker

@cessien
Copy link
Contributor

cessien commented Apr 28, 2015

@hschin you should be be all set at the point. as of 3.4.x the worker is no longer a component! you should be able to access onebody now!

@seven1m
Copy link
Owner

seven1m commented Apr 28, 2015

Oops, forgot to take off the worker stuff. I edited my comment above and edited the wiki page too. Thanks @cessien!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants