##困っていること
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
回答1件
あなたの回答
tips
プレビュー