0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

dockerでhanami

Last updated at Posted at 2019-11-17

hanami(1.3.3)をインストールしようとすると

% docker-compose build                                                                      (master #%) [~/develop/chat-memo]
db uses an image, skipping
Building app
Step 1/8 : FROM ruby:2.6.5
 ---> d98e4013532b
Step 2/8 : RUN apt-get update -qq && apt-get install -y nodejs mariadb-client
 ---> Using cache
 ---> a78142bbe439
Step 3/8 : RUN mkdir /chat-memo
 ---> Running in e0eb9d958b18
Removing intermediate container e0eb9d958b18
 ---> 9d9a0fd16da0
Step 4/8 : WORKDIR /chat-memo
 ---> Running in 7f4da86a7bc3
Removing intermediate container 7f4da86a7bc3
 ---> e8f1bfd1e331
Step 5/8 : COPY Gemfile /chat-memo/Gemfile
 ---> 7037872d4424
Step 6/8 : COPY Gemfile.lock /chat-memo/Gemfile.lock
 ---> 50102ed83eae
Step 7/8 : RUN bundle install
 ---> Running in 1031b7632c10
Fetching gem metadata from https://rubygems.org/............
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Bundler could not find compatible versions for gem "dry-types":
  In snapshot (Gemfile.lock):
    dry-types (= 0.12.3)

  In Gemfile:
    hanami (~> 1.3) was resolved to 1.3.3, which depends on
      hanami-validations (>= 1.3, < 3) was resolved to 1.3.5, which depends on
dry-validation (~> 0.11, < 0.12) was resolved to 0.11.2, which depends
on
          dry-types (~> 0.12.0)

    hanami-model (~> 1.3) was resolved to 1.3.2, which depends on
      dry-types (~> 0.11.0)

Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.
ERROR: Service 'app' failed to build: The command '/bin/sh -c bundle install' returned a non-zero code: 6

というエラーになる。どうやらhanami-validationshanami-modelが依存しているdry-typesのバージョンが異なるらしい。ので~> 0.11.0をあらかじめ指定したらうまくいった。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?