LoginSignup
1
0

More than 3 years have passed since last update.

[rails×Docker]rails 再起動したいだけなのに、exited with code 1にハマった話。

Posted at

rails sの再起動をしたく、Dockerを起動し直していた際に
また「exited with code 1」にハマってしまった。

web_1  | bundler: failed to load command: rails (/usr/local/bundle/bin/rails)
docker_byt_web_1 exited with code 1
^CGracefully stopping... (press Ctrl+C again to force)
Stopping docker_byt_db_1  ... done

railsも起動していないので、エラー内容もわからず。
今回は、コンテナ内に入って、rails sをしてみることに。

#コンテナに入ります
$ docker-compose exec web bash

コンテナ内では「docker-compose run web」は不要のため
まずはrails s。

すると、、、

rbenv: version `ruby-2.5.8' is not installed (set by /Users/y-kikuchi/projects/docker_byt/.ruby-version)

インストール系が怪しい?

そこで、再度コンテナ外からインストールを試みて
無事、起動に成功しました!

docker-compose build --no-cache

よかった〜、、、

1
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
1
0