質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.51%
docker-compose

docker-composeとは、複数のコンテナで構成されるサービスを提供する手順を自動的し管理を簡単にするツール。composeファイルを使用しコマンド1回で設定した全サービスを作成・起動することが可能です。

Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

Ruby on Rails 6

Ruby on Rails 6は、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

Ruby on Rails

Ruby on Railsは、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

Docker

Dockerは、Docker社が開発したオープンソースのコンテナー管理ソフトウェアの1つです

Q&A

解決済

1回答

18043閲覧

exited with code 1というエラーが発生する。

pay_561

総合スコア26

docker-compose

docker-composeとは、複数のコンテナで構成されるサービスを提供する手順を自動的し管理を簡単にするツール。composeファイルを使用しコマンド1回で設定した全サービスを作成・起動することが可能です。

Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

Ruby on Rails 6

Ruby on Rails 6は、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

Ruby on Rails

Ruby on Railsは、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

Docker

Dockerは、Docker社が開発したオープンソースのコンテナー管理ソフトウェアの1つです

0グッド

0クリップ

投稿2021/02/15 22:29

編集2021/02/15 22:57

##困っていること
Railsにてdocker-comopse upで起動した際にexited with code 1というエラーで止まってしまいます。

##試したこと
自分なりに調べた際に解決策としてtmp/pidsにあるファイルを削除すると書いてありましたが
そのようなファイルはありませんでした。

##routes.rb

Rails.application.routes.draw do root to: 'games#index' resources :posts devise_for :users, resources :profiles, only: [:show, :new, :edit, :create, :update] end

##log

$docker-compose up Starting app_db_1 ... done Recreating app_web_1 ... done Attaching to game-bug-app_db_1, game-bug-app_web_1 db_1 | 2021-02-15 22:23:15+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.23-1debian10 started. db_1 | 2021-02-15 22:23:15+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql' db_1 | 2021-02-15 22:23:15+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.23-1debian10 started. db_1 | 2021-02-15T22:23:16.132275Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.23) starting as process 1 db_1 | 2021-02-15T22:23:16.137684Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for /var/lib/mysql/ is case insensitive db_1 | 2021-02-15T22:23:16.150163Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. db_1 | 2021-02-15T22:23:16.676706Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended. db_1 | 2021-02-15T22:23:16.840530Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock db_1 | 2021-02-15T22:23:16.935622Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed. db_1 | 2021-02-15T22:23:16.935920Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel. db_1 | 2021-02-15T22:23:16.943959Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory. db_1 | 2021-02-15T22:23:17.012549Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.23' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server - GPL. web_1 | => Booting Puma web_1 | => Rails 6.1.2 application starting in development web_1 | => Run `bin/rails server --help` for more startup options web_1 | Exiting web_1 | /usr/local/bundle/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:59:in `load': /app/config/routes.rb:5: syntax error, unexpected symbol literal, expecting `do' or '{' or '(' (SyntaxError) web_1 | resources :profiles, only: [:show, :new,... web_1 | ^ web_1 | /app/config/routes.rb:6: syntax error, unexpected `end', expecting end-of-input web_1 | from /usr/local/bundle/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:59:in `load' web_1 | from /usr/local/bundle/gems/railties-6.1.2/lib/rails/application/routes_reloader.rb:47:in `block in load_paths' web_1 | from /usr/local/bundle/gems/railties-6.1.2/lib/rails/application/routes_reloader.rb:47:in `each' web_1 | from /usr/local/bundle/gems/railties-6.1.2/lib/rails/application/routes_reloader.rb:47:in `load_paths' web_1 | from /usr/local/bundle/gems/railties-6.1.2/lib/rails/application/routes_reloader.rb:21:in `reload!' web_1 | from /usr/local/bundle/gems/railties-6.1.2/lib/rails/application/routes_reloader.rb:35:in `block in updater' web_1 | from /usr/local/bundle/gems/activesupport-6.1.2/lib/active_support/file_update_checker.rb:83:in `execute' web_1 | from /usr/local/bundle/gems/railties-6.1.2/lib/rails/application/routes_reloader.rb:10:in `execute' web_1 | from /usr/local/bundle/gems/railties-6.1.2/lib/rails/application/finisher.rb:195:in `block in <module:Finisher>' web_1 | from /usr/local/bundle/gems/railties-6.1.2/lib/rails/initializable.rb:32:in `instance_exec' web_1 | from /usr/local/bundle/gems/railties-6.1.2/lib/rails/initializable.rb:32:in `run' web_1 | from /usr/local/bundle/gems/railties-6.1.2/lib/rails/initializable.rb:61:in `block in run_initializers' web_1 | from /usr/local/lib/ruby/2.7.0/tsort.rb:228:in `block in tsort_each' web_1 | from /usr/local/lib/ruby/2.7.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component' web_1 | from /usr/local/lib/ruby/2.7.0/tsort.rb:431:in `each_strongly_connected_component_from' web_1 | from /usr/local/lib/ruby/2.7.0/tsort.rb:349:in `block in each_strongly_connected_component' web_1 | from /usr/local/lib/ruby/2.7.0/tsort.rb:347:in `each' web_1 | from /usr/local/lib/ruby/2.7.0/tsort.rb:347:in `call' web_1 | from /usr/local/lib/ruby/2.7.0/tsort.rb:347:in `each_strongly_connected_component' web_1 | from /usr/local/lib/ruby/2.7.0/tsort.rb:226:in `tsort_each' web_1 | from /usr/local/lib/ruby/2.7.0/tsort.rb:205:in `tsort_each' web_1 | from /usr/local/bundle/gems/railties-6.1.2/lib/rails/initializable.rb:60:in `run_initializers' web_1 | from /usr/local/bundle/gems/railties-6.1.2/lib/rails/application.rb:384:in `initialize!' web_1 | from /app/config/environment.rb:5:in `<main>' web_1 | from /usr/local/bundle/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require' web_1 | from /usr/local/bundle/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi' web_1 | from /usr/local/bundle/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register' web_1 | from /usr/local/bundle/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi' web_1 | from /usr/local/bundle/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require' web_1 | from /usr/local/bundle/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:34:in `require' web_1 | from /usr/local/bundle/gems/activesupport-6.1.2/lib/active_support/dependencies.rb:332:in `block in require' web_1 | from /usr/local/bundle/gems/activesupport-6.1.2/lib/active_support/dependencies.rb:299:in `load_dependency' web_1 | from /usr/local/bundle/gems/activesupport-6.1.2/lib/active_support/dependencies.rb:332:in `require' web_1 | from /usr/local/bundle/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:53:in `require_relative' web_1 | from config.ru:3:in `block in <main>' web_1 | from /usr/local/bundle/gems/rack-2.2.3/lib/rack/builder.rb:116:in `eval' web_1 | from /usr/local/bundle/gems/rack-2.2.3/lib/rack/builder.rb:116:in `new_from_string' web_1 | from /usr/local/bundle/gems/rack-2.2.3/lib/rack/builder.rb:105:in `load_file' web_1 | from /usr/local/bundle/gems/rack-2.2.3/lib/rack/builder.rb:66:in `parse_file' web_1 | from /usr/local/bundle/gems/rack-2.2.3/lib/rack/server.rb:349:in `build_app_and_options_from_config' web_1 | from /usr/local/bundle/gems/rack-2.2.3/lib/rack/server.rb:249:in `app' web_1 | from /usr/local/bundle/gems/rack-2.2.3/lib/rack/server.rb:422:in `wrapped_app' web_1 | from /usr/local/bundle/gems/railties-6.1.2/lib/rails/commands/server/server_command.rb:77:in `log_to_stdout' web_1 | from /usr/local/bundle/gems/railties-6.1.2/lib/rails/commands/server/server_command.rb:37:in `start' web_1 | from /usr/local/bundle/gems/railties-6.1.2/lib/rails/commands/server/server_command.rb:144:in `block in perform' web_1 | from /usr/local/bundle/gems/railties-6.1.2/lib/rails/commands/server/server_command.rb:135:in `tap' web_1 | from /usr/local/bundle/gems/railties-6.1.2/lib/rails/commands/server/server_command.rb:135:in `perform' web_1 | from /usr/local/bundle/gems/thor-1.1.0/lib/thor/command.rb:27:in `run' web_1 | from /usr/local/bundle/gems/thor-1.1.0/lib/thor/invocation.rb:127:in `invoke_command' web_1 | from /usr/local/bundle/gems/thor-1.1.0/lib/thor.rb:392:in `dispatch' web_1 | from /usr/local/bundle/gems/railties-6.1.2/lib/rails/command/base.rb:69:in `perform' web_1 | from /usr/local/bundle/gems/railties-6.1.2/lib/rails/command.rb:50:in `invoke' web_1 | from /usr/local/bundle/gems/railties-6.1.2/lib/rails/commands.rb:18:in `<main>' web_1 | from /usr/local/bundle/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require' web_1 | from /usr/local/bundle/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi' web_1 | from /usr/local/bundle/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register' web_1 | from /usr/local/bundle/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi' web_1 | from /usr/local/bundle/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require' web_1 | from /app/bin/rails:5:in `<top (required)>' web_1 | from /usr/local/bundle/gems/spring-2.1.1/lib/spring/client/rails.rb:28:in `load' web_1 | from /usr/local/bundle/gems/spring-2.1.1/lib/spring/client/rails.rb:28:in `call' web_1 | from /usr/local/bundle/gems/spring-2.1.1/lib/spring/client/command.rb:7:in `call' web_1 | from /usr/local/bundle/gems/spring-2.1.1/lib/spring/client.rb:30:in `run' web_1 | from /usr/local/bundle/gems/spring-2.1.1/bin/spring:49:in `<top (required)>' web_1 | from /usr/local/bundle/gems/spring-2.1.1/lib/spring/binstub.rb:11:in `load' web_1 | from /usr/local/bundle/gems/spring-2.1.1/lib/spring/binstub.rb:11:in `<top (required)>' web_1 | from /app/bin/spring:10:in `require' web_1 | from /app/bin/spring:10:in `block in <top (required)>' web_1 | from /app/bin/spring:7:in `tap' web_1 | from /app/bin/spring:7:in `<top (required)>' web_1 | from bin/rails:2:in `load' web_1 | from bin/rails:2:in `<main>' app_web_1 exited with code 1

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

maisumakun

2021/02/15 22:52

config/routes.rbの中身を提示していただけますか?
pay_561

2021/02/15 22:58

routes.rbの追記させていただきました。
guest

回答1

0

ベストアンサー

/app/config/routes.rb:6: syntax error, unexpected `end', expecting end-of-input

エラーメッセージの通り、config/routes.rb文法的に正しくありません

ruby

1 devise_for :users, # ここのコンマが余計、あるいは後ろに続くべきものを書き忘れたのではないでしょうか 2 resources :profiles, only: [:show, :new, :edit, :create, :update]

投稿2021/02/15 23:01

maisumakun

総合スコア145064

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

pay_561

2021/02/15 23:12

コンマを消したら無事起動出来ました!!!! 質問に時間を割いて下さりありがとうございました。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.51%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問