portabilis / i-diario

Lançando o maior software livre de educação do Brasil!
Other
95 stars 45 forks source link

Docker install: idiario exited with code 1 #98

Closed hermesalvesbr closed 2 years ago

hermesalvesbr commented 2 years ago

VERSÃO: 1.3.6.

DESCRIÇÃO: Ao tentar instalar o i-diario, via DOCKER, ele finaliza com essa mensagem de erro:

diario  |      from /app/bin/rails:9:in `require'
idiario  |      from /app/bin/rails:9:in `<top (required)>'
idiario  |      from /box/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `load'
idiario  |      from /box/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `call'
idiario  |      from /box/gems/spring-2.0.2/lib/spring/client/command.rb:7:in `call'
idiario  |      from /box/gems/spring-2.0.2/lib/spring/client.rb:30:in `run'
idiario  |      from /box/gems/spring-2.0.2/bin/spring:49:in `<top (required)>'
idiario  |      from /box/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `load'
idiario  |      from /box/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `<top (required)>'
idiario  |      from /app/bin/spring:15:in `require'
idiario  |      from /app/bin/spring:15:in `<top (required)>'
idiario  |      from bin/rails:3:in `load'
idiario  |      from bin/rails:3:in `<main>'
idiario exited with code 1

OBSERVAÇÕES:

No linux meu docker --version Docker version 20.10.9, build c2ea9bc

AMBIENTE:

albericobenhur commented 2 years ago

Did you solve it? I have the same problem!

albericobenhur commented 2 years ago

Estou com o mesmo problema. Você conseguiu resolver?

hermesalvesbr commented 2 years ago

Não. Ainda não 😔

tiagocamargo commented 2 years ago

Vocês podem enviar o erro completo?

hermesalvesbr commented 2 years ago

Bom dia Tiago, obrigado pelo retorno.


❯ docker-compose up --build
[+] Building 0.9s (10/10) FINISHED                                                                        
 => [internal] load build definition from Dockerfile                                                 0.0s
 => => transferring dockerfile: 32B                                                                  0.0s
 => [internal] load .dockerignore                                                                    0.0s
 => => transferring context: 2B                                                                      0.0s
 => [internal] load metadata for docker.io/library/ruby:2.4.10-slim-buster                           0.9s
 => [1/6] FROM docker.io/library/ruby:2.4.10-slim-buster@sha256:ac34ee3f02c12e9c6fdfa2164bd7f98e579  0.0s
 => CACHED [2/6] RUN apt-get update -qq                                                              0.0s
 => CACHED [3/6] RUN apt-get install -y build-essential libpq-dev nodejs npm git                     0.0s
 => CACHED [4/6] RUN npm i -g yarn                                                                   0.0s
 => CACHED [5/6] RUN mkdir /app                                                                      0.0s
 => CACHED [6/6] WORKDIR /app                                                                        0.0s
 => exporting to image                                                                               0.0s
 => => exporting layers                                                                              0.0s
 => => writing image sha256:dde936a036588a9b977c548da02026f20168ee8ccf0af5820f144d2773646882         0.0s
 => => naming to docker.io/library/i-diario_app                                                      0.0s
[+] Running 4/0
 ⠿ Network i-diario_default    Created                                                               0.0s
 ⠿ Container redis-idiario     Created                                                               0.0s
 ⠿ Container postgres-idiario  Created                                                               0.0s
 ⠿ Container idiario           Created                                                               0.0s
Attaching to idiario, postgres-idiario, redis-idiario
redis-idiario     | 1:C 29 Apr 12:02:35.142 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
redis-idiario     | 1:C 29 Apr 12:02:35.142 # Redis version=4.0.14, bits=64, commit=00000000, modified=0, pid=1, just started
redis-idiario     | 1:C 29 Apr 12:02:35.142 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
redis-idiario     | 1:M 29 Apr 12:02:35.143 * Running mode=standalone, port=6379.
redis-idiario     | 1:M 29 Apr 12:02:35.143 # Server initialized
redis-idiario     | 1:M 29 Apr 12:02:35.143 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
redis-idiario     | 1:M 29 Apr 12:02:35.143 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
redis-idiario     | 1:M 29 Apr 12:02:35.143 * Ready to accept connections
postgres-idiario  | 
postgres-idiario  | PostgreSQL Database directory appears to contain a database; Skipping initialization
postgres-idiario  | 
postgres-idiario  | 2022-04-29 12:02:35.192 UTC [1] LOG:  starting PostgreSQL 12.10 on x86_64-pc-linux-musl, compiled by gcc (Alpine 10.3.1_git20211027) 10.3.1 20211027, 64-bit
postgres-idiario  | 2022-04-29 12:02:35.192 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
postgres-idiario  | 2022-04-29 12:02:35.192 UTC [1] LOG:  listening on IPv6 address "::", port 5432
postgres-idiario  | 2022-04-29 12:02:35.196 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
postgres-idiario  | 2022-04-29 12:02:35.206 UTC [21] LOG:  database system was shut down at 2022-04-29 12:02:26 UTC
postgres-idiario  | 2022-04-29 12:02:35.209 UTC [1] LOG:  database system is ready to accept connections
idiario           | The Gemfile's dependencies are satisfied
idiario           | yarn install v1.22.18
idiario           | [1/4] Resolving packages...
idiario           | success Already up-to-date.
idiario           | Done in 0.33s.
idiario           | Starting..
idiario           | /box/gems/skylight-core-4.3.2/lib/skylight/core/probes.rb:118:in `require': /box/gems/rack-mini-profiler-3.0.0/lib/mini_profiler/storage/redis_store.rb:238: syntax error, unexpected keyword_rescue, expecting keyword_end (SyntaxError)
idiario           |         rescue
idiario           |               ^
idiario           | /box/gems/rack-mini-profiler-3.0.0/lib/mini_profiler/storage/redis_store.rb:352: syntax error, unexpected keyword_end, expecting end-of-input
idiario           |     from /box/gems/skylight-core-4.3.2/lib/skylight/core/probes.rb:118:in `require'
idiario           |     from /box/gems/activesupport-4.2.11.1/lib/active_support/dependencies.rb:274:in `block in require'
idiario           |     from /box/gems/activesupport-4.2.11.1/lib/active_support/dependencies.rb:240:in `load_dependency'
idiario           |     from /box/gems/activesupport-4.2.11.1/lib/active_support/dependencies.rb:274:in `require'
idiario           |     from /box/gems/rack-mini-profiler-3.0.0/lib/rack-mini-profiler.rb:21:in `<top (required)>'
idiario           |     from /usr/local/lib/ruby/site_ruby/2.4.0/bundler/runtime.rb:81:in `require'
idiario           |     from /usr/local/lib/ruby/site_ruby/2.4.0/bundler/runtime.rb:81:in `block (2 levels) in require'
idiario           |     from /usr/local/lib/ruby/site_ruby/2.4.0/bundler/runtime.rb:76:in `each'
idiario           |     from /usr/local/lib/ruby/site_ruby/2.4.0/bundler/runtime.rb:76:in `block in require'
idiario           |     from /usr/local/lib/ruby/site_ruby/2.4.0/bundler/runtime.rb:65:in `each'
idiario           |     from /usr/local/lib/ruby/site_ruby/2.4.0/bundler/runtime.rb:65:in `require'
idiario           |     from /usr/local/lib/ruby/site_ruby/2.4.0/bundler.rb:114:in `require'
idiario           |     from /app/config/application.rb:8:in `<top (required)>'
idiario           |     from /box/gems/railties-4.2.11.1/lib/rails/commands/commands_tasks.rb:78:in `require'
idiario           |     from /box/gems/railties-4.2.11.1/lib/rails/commands/commands_tasks.rb:78:in `block in server'
idiario           |     from /box/gems/railties-4.2.11.1/lib/rails/commands/commands_tasks.rb:75:in `tap'
idiario           |     from /box/gems/railties-4.2.11.1/lib/rails/commands/commands_tasks.rb:75:in `server'
idiario           |     from /box/gems/railties-4.2.11.1/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
idiario           |     from /box/gems/railties-4.2.11.1/lib/rails/commands.rb:17:in `<top (required)>'
idiario           |     from /app/bin/rails:9:in `require'
idiario           |     from /app/bin/rails:9:in `<top (required)>'
idiario           |     from /box/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `load'
idiario           |     from /box/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `call'
idiario           |     from /box/gems/spring-2.0.2/lib/spring/client/command.rb:7:in `call'
idiario           |     from /box/gems/spring-2.0.2/lib/spring/client.rb:30:in `run'
idiario           |     from /box/gems/spring-2.0.2/bin/spring:49:in `<top (required)>'
idiario           |     from /box/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `load'
idiario           |     from /box/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `<top (required)>'
idiario           |     from /app/bin/spring:15:in `require'
idiario           |     from /app/bin/spring:15:in `<top (required)>'
idiario           |     from bin/rails:3:in `load'
idiario           |     from bin/rails:3:in `<main>'
idiario exited with code 1
tiagocamargo commented 2 years ago

Tens como fazer um teste? Remove a gem skylight. Só excluir essa linha.

hermesalvesbr commented 2 years ago

gem 'skylight', '4.3.2' foi pro saco, mas o erro continua.

Sumiu o erro do skylight e agora foi pro : syntax error, unexpected keyword_rescue, expecting keyword_end (SyntaxError)


❯ ls
app                 config           docker-compose.yml  lib           postcss.config.js  README.md  yarn.lock
babel.config.js     config.ru        Dockerfile          LICENSE       Procfile           script
bin                 CONTRIBUTING.md  Gemfile             node_modules  public             spec
CODE_OF_CONDUCT.md  db               Gemfile.lock        package.json  Rakefile           vendor
❯ nvim Gemfile
❯ docker-compose up
❯ docker-compose up --build
[+] Building 1.7s (11/11) FINISHED                                                                                  
 => [internal] load build definition from Dockerfile                                                           0.0s
 => => transferring dockerfile: 32B                                                                            0.0s
 => [internal] load .dockerignore                                                                              0.0s
 => => transferring context: 2B                                                                                0.0s
 => [internal] load metadata for docker.io/library/ruby:2.4.10-slim-buster                                     1.6s
 => [auth] library/ruby:pull token for registry-1.docker.io                                                    0.0s
 => [1/6] FROM docker.io/library/ruby:2.4.10-slim-buster@sha256:ac34ee3f02c12e9c6fdfa2164bd7f98e579ef59e6f083  0.0s
 => CACHED [2/6] RUN apt-get update -qq                                                                        0.0s
 => CACHED [3/6] RUN apt-get install -y build-essential libpq-dev nodejs npm git                               0.0s
 => CACHED [4/6] RUN npm i -g yarn                                                                             0.0s
 => CACHED [5/6] RUN mkdir /app                                                                                0.0s
 => CACHED [6/6] WORKDIR /app                                                                                  0.0s
 => exporting to image                                                                                         0.0s
 => => exporting layers                                                                                        0.0s
 => => writing image sha256:dde936a036588a9b977c548da02026f20168ee8ccf0af5820f144d2773646882                   0.0s
 => => naming to docker.io/library/i-diario_app                                                                0.0s
[+] Running 3/0
 ⠿ Container postgres-idiario  Created                                                                         0.0s
 ⠿ Container redis-idiario     Created                                                                         0.0s
 ⠿ Container idiario           Created                                                                         0.0s
Attaching to idiario, postgres-idiario, redis-idiario
postgres-idiario  | 
postgres-idiario  | PostgreSQL Database directory appears to contain a database; Skipping initialization
postgres-idiario  | 
postgres-idiario  | 2022-04-29 12:46:44.671 UTC [1] LOG:  starting PostgreSQL 12.10 on x86_64-pc-linux-musl, compiled by gcc (Alpine 10.3.1_git20211027) 10.3.1 20211027, 64-bit
postgres-idiario  | 2022-04-29 12:46:44.671 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
postgres-idiario  | 2022-04-29 12:46:44.671 UTC [1] LOG:  listening on IPv6 address "::", port 5432
postgres-idiario  | 2022-04-29 12:46:44.675 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
postgres-idiario  | 2022-04-29 12:46:44.684 UTC [21] LOG:  database system was shut down at 2022-04-29 12:06:49 UTC
postgres-idiario  | 2022-04-29 12:46:44.687 UTC [1] LOG:  database system is ready to accept connections
redis-idiario     | 1:C 29 Apr 12:46:44.695 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
redis-idiario     | 1:C 29 Apr 12:46:44.695 # Redis version=4.0.14, bits=64, commit=00000000, modified=0, pid=1, just started
redis-idiario     | 1:C 29 Apr 12:46:44.695 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
redis-idiario     | 1:M 29 Apr 12:46:44.696 * Running mode=standalone, port=6379.
redis-idiario     | 1:M 29 Apr 12:46:44.696 # Server initialized
redis-idiario     | 1:M 29 Apr 12:46:44.696 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
redis-idiario     | 1:M 29 Apr 12:46:44.696 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
redis-idiario     | 1:M 29 Apr 12:46:44.696 * DB loaded from disk: 0.000 seconds
redis-idiario     | 1:M 29 Apr 12:46:44.696 * Ready to accept connections
idiario           | The Gemfile's dependencies are satisfied
idiario           | yarn install v1.22.18
idiario           | [1/4] Resolving packages...
idiario           | success Already up-to-date.
idiario           | Done in 0.31s.
idiario           | Starting..
idiario           | /box/gems/activesupport-4.2.11.1/lib/active_support/dependencies.rb:274:in `require': /box/gems/rack-mini-profiler-3.0.0/lib/mini_profiler/storage/redis_store.rb:238: syntax error, unexpected keyword_rescue, expecting keyword_end (SyntaxError)
idiario           |         rescue
idiario           |               ^
idiario           | /box/gems/rack-mini-profiler-3.0.0/lib/mini_profiler/storage/redis_store.rb:352: syntax error, unexpected keyword_end, expecting end-of-input
idiario           |     from /box/gems/activesupport-4.2.11.1/lib/active_support/dependencies.rb:274:in `block in require'
idiario           |     from /box/gems/activesupport-4.2.11.1/lib/active_support/dependencies.rb:240:in `load_dependency'
idiario           |     from /box/gems/activesupport-4.2.11.1/lib/active_support/dependencies.rb:274:in `require'
idiario           |     from /box/gems/rack-mini-profiler-3.0.0/lib/rack-mini-profiler.rb:21:in `<top (required)>'
idiario           |     from /usr/local/lib/ruby/site_ruby/2.4.0/bundler/runtime.rb:81:in `require'
idiario           |     from /usr/local/lib/ruby/site_ruby/2.4.0/bundler/runtime.rb:81:in `block (2 levels) in require'
idiario           |     from /usr/local/lib/ruby/site_ruby/2.4.0/bundler/runtime.rb:76:in `each'
idiario           |     from /usr/local/lib/ruby/site_ruby/2.4.0/bundler/runtime.rb:76:in `block in require'
idiario           |     from /usr/local/lib/ruby/site_ruby/2.4.0/bundler/runtime.rb:65:in `each'
idiario           |     from /usr/local/lib/ruby/site_ruby/2.4.0/bundler/runtime.rb:65:in `require'
idiario           |     from /usr/local/lib/ruby/site_ruby/2.4.0/bundler.rb:114:in `require'
idiario           |     from /app/config/application.rb:8:in `<top (required)>'
idiario           |     from /box/gems/railties-4.2.11.1/lib/rails/commands/commands_tasks.rb:78:in `require'
idiario           |     from /box/gems/railties-4.2.11.1/lib/rails/commands/commands_tasks.rb:78:in `block in server'
idiario           |     from /box/gems/railties-4.2.11.1/lib/rails/commands/commands_tasks.rb:75:in `tap'
idiario           |     from /box/gems/railties-4.2.11.1/lib/rails/commands/commands_tasks.rb:75:in `server'
idiario           |     from /box/gems/railties-4.2.11.1/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
idiario           |     from /box/gems/railties-4.2.11.1/lib/rails/commands.rb:17:in `<top (required)>'
idiario           |     from /app/bin/rails:9:in `require'
idiario           |     from /app/bin/rails:9:in `<top (required)>'
idiario           |     from /box/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `load'
idiario           |     from /box/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `call'
idiario           |     from /box/gems/spring-2.0.2/lib/spring/client/command.rb:7:in `call'
idiario           |     from /box/gems/spring-2.0.2/lib/spring/client.rb:30:in `run'
idiario           |     from /box/gems/spring-2.0.2/bin/spring:49:in `<top (required)>'
idiario           |     from /box/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `load'
idiario           |     from /box/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `<top (required)>'
idiario           |     from /app/bin/spring:15:in `require'
idiario           |     from /app/bin/spring:15:in `<top (required)>'
idiario           |     from bin/rails:3:in `load'
idiario           |     from bin/rails:3:in `<main>'
idiario exited with code 1
hermesalvesbr commented 2 years ago

Bom dia @tiagocamargo , mais alguma ideia? fico grato com qualquer sugestão.

hermesalvesbr commented 2 years ago

Bom dia,

Continuo na saga de tentar instalar o i-diario, nesta nova versão as coisas mudaram .

Utilizando as instruções de instalação via docker, o erro agora é outro.

Tela_20220513_112040

Então mesmo não sendo informado no readme para a instalação via docker, eu executei o comando:

bundle exec rake db:migrate

E o erro modificou para:

image

Então resolvi seguir as instruções do ubuntu dentro do container docker:

Segui até este comando: bundle exec rake entity:setup NAME=prefeitura DOMAIN=localhost DATABASE=prefeitura_diario

E finalmente abriu:

image

Porém, não é possível efetuar o login com os dados informados no readme.

Você poderá acessar o i-Diário na URL http://localhost:3000/ com o login admin e a senha 123456789.

E mesmo de dentro do container, não foi possível acessar o console do rails e criar novo usuário (bundle exec rails console).

image

Alguma sugestão de como devo criar o acesso do ADMIN para o sistema?

tiagocamargo commented 2 years ago

Eu preciso criar um ambiente para tentar simular o erro, assim que conseguir evoluir algo, aviso vocês.

hermesalvesbr commented 2 years ago

Dediquei minha manhã, novamente, a esta tentativa. Percebi que de dentro do contêiner do rails ele não encontra o "localhost" do postgres. Então mudei para o nome(postgres-idiario) do contêiner, e encontrou.

Só que para no 404, não encontra a rota da primeira página.

gustavomendess commented 2 years ago

Boa noite @hermesalvesbr, tudo bem?

Ajustei a instalação via docker, está neste pr: https://github.com/portabilis/i-diario/pull/103

Para você testar, basta rodar a partir da branch main do projeto:

git fetch
git checkout fix-docker-install

E seguir o passo-a-passo da instalação via docker que irá funcionar.

Em breve irei fazer o merge do PR, porém, por ora você já consegue utilizar da maneira que citei acima.

Caso tenha alguma dúvida pode me acionar por aqui!

Vou aguardar seu retorno, caso seja positivo, por gentileza me avisa por aqui que irei encerrar a issue.

ps: Estou utilizando a versão mais atualizada do sistema!

hermesalvesbr commented 2 years ago

Obrigado pela ajuda @gustavomendess . Agora rodou facilmente por docker, porém não faz login:

idiario  | Started POST "/usuarios/logar" for 172.28.0.1 at 2022-05-21 12:26:41 +0000
idiario  | Processing by Users::SessionsController#create as HTML
idiario  |   Parameters: {"utf8"=>"✓", "authenticity_token"=>"v4BjRFPNYJh11I9DeF7KdpeWoV/xovn2YAugXZBV0CZnWkOhZX6W1/7gAXTHMyeOZslfSKdWvQItz/UhwY5F2A==", "user"=>{"credentials"=>"admin", "password"=>"[FILTERED]"}, "commit"=>"Acessar", "locale"=>"pt-BR"}
idiario  |   Entity Load (0.7ms)  SELECT  "entities".* FROM "entities" WHERE "entities"."domain" = $1 LIMIT 1  [["domain", "localhost"]]
idiario  |   User Load (0.7ms)  SELECT  "users".* FROM "users" WHERE (users.login = 'admin' OR users.email = 'admin')  ORDER BY "users"."id" ASC LIMIT 1
idiario  | Completed 401 Unauthorized in 5ms (ActiveRecord: 1.4ms)
idiario  | Processing by Users::SessionsController#new as HTML
idiario  |   Parameters: {"utf8"=>"✓", "authenticity_token"=>"v4BjRFPNYJh11I9DeF7KdpeWoV/xovn2YAugXZBV0CZnWkOhZX6W1/7gAXTHMyeOZslfSKdWvQItz/UhwY5F2A==", "user"=>{"credentials"=>"admin", "password"=>"[FILTERED]"}, "commit"=>"Acessar", "locale"=>"pt-BR"}
idiario  |   CACHE (0.0ms)  SELECT  "entities".* FROM "entities" WHERE "entities"."domain" = $1 LIMIT 1  [["domain", "localhost"]]
idiario  |   User Load (0.7ms)  SELECT  "users".* FROM "users" WHERE "users"."login" = $1 LIMIT 1  [["login", "admin"]]
idiario  |   Rendered devise/shared/_links.erb (0.2ms)
idiario  |   Rendered devise/sessions/new.html.erb within layouts/devise (2.3ms)
idiario  |   Rendered layouts/_google_tag_manager_head.html.erb (0.0ms)
idiario  |   Rendered layouts/_default_headers.html.erb (5.1ms)
idiario  |   Rendered layouts/_google_tag_manager_body.html.erb (0.0ms)
idiario  |   Rendered layouts/_not_logged_header.html.erb (1.0ms)
idiario  |   Rendered layouts/devise.html.erb (13.5ms)
idiario  | Completed 200 OK in 62ms (Views: 15.5ms | ActiveRecord: 0.7ms)
gustavomendess commented 2 years ago

Bom dia, @hermesalvesbr

Você digitou a nova senha conforme o read-me atualizado no PR?

hermesalvesbr commented 2 years ago

Bom dia Gustavo,

Isso mesmo com a nova senha A123456789$, chequei também no banco de dados.

Então verifiquei no banco e a tabela users não foi populada: Tela_20220522_095032

Tentei fazer um insert direto para ver se a senha antiga funcionaria:

INSERT INTO public.users (email,encrypted_password,reset_password_token,reset_password_sent_at,remember_created_at,sign_in_count,current_sign_in_at,last_sign_in_at,current_sign_in_ip,last_sign_in_ip,failed_attempts,unlock_token,locked_at,created_at,updated_at,first_name,last_name,login,phone,cpf,authorize_email_and_sms,status,kind,student_id,activation_sent_at,"admin",teacher_id,current_user_role_id,current_classroom_id,current_discipline_id,current_unity_id,assumed_teacher_id,receive_news,receive_news_related_daily_teacher,receive_news_related_tools_for_parents,receive_news_related_all_matters,current_school_year,expiration_date,profile_picture,fullname,current_knowledge_area_id,fullname_tokens,last_activity_at,last_password_change) VALUES
     ('admin@domain.com.br','$2a$10$j1WFPYK0QO67aJB2dXVaduStvz5lv0rIyt.Bcb215StVPFeeRn9li',NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,3,NULL,NULL,'2022-05-21 12:25:45.682','2022-05-21 12:25:45.682','Admin',NULL,'admin',NULL,NULL,false,'active','employee',NULL,NULL,true,NULL,NULL,NULL,NULL,NULL,NULL,false,true,true,true,NULL,NULL,NULL,'Admin',NULL,'''admin'':1','2022-05-20 00:00:00.000','2022-05-20 00:00:00.000');

Também não funcionou, deve ter algum relacionamento que impediu.

hermesalvesbr commented 2 years ago

Funcionou, vou registrar aqui como foi feito.

  1. Removi os contêineres que estavam rodando, em vez de atualiza-los.
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
  1. Me certifiquei de remover o banco idiario_development para que fosse criado novamente.

Obrigado por toda energia investida.

Ildeardson commented 2 weeks ago

Bom dia estou tentando instalar o i-Diario 1.6 via docker ubuntu 22.04, porem sempre recebo este erro; alguém poderia me ajudar.

Attaching to idiario idiario | The Gemfile's dependencies are satisfied idiario | yarn install v1.22.22 idiario | [1/4] Resolving packages... idiario | success Already up-to-date. idiario | Done in 0.69s. idiario | Starting.. idiario | Tilt::LessTemplate is deprecated, consider switching from LESS to SCSS idiario | warning: parser/current is loading parser/ruby26, which recognizes 2.6.10-compliant syntax, but you are running 2.6.6. idiario | Please see https://github.com/whitequark/parser#compatibility-with-ruby-mri. idiario | => Booting Puma idiario | => Rails 5.0.7.2 application starting in development on http://0.0.0.0:3000 idiario | => Run rails server -h for more startup options idiario | /box/ruby/2.6.0/gems/redis-4.1.4/lib/redis/client.rb:439:in _parse_options': invalid uri scheme '' (ArgumentError) idiario | from /box/ruby/2.6.0/gems/redis-4.1.4/lib/redis/client.rb:83:ininitialize' idiario | from /box/ruby/2.6.0/gems/redis-4.1.4/lib/redis.rb:44:in new' idiario | from /box/ruby/2.6.0/gems/redis-4.1.4/lib/redis.rb:44:ininitialize' idiario | from /app/config/initializers/redis.rb:13:in new' idiario | from /app/config/initializers/redis.rb:13:in

' idiario | from /box/ruby/2.6.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:287:in load' idiario | from /box/ruby/2.6.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:287:inblock in load' idiario | from /box/ruby/2.6.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:259:in load_dependency' idiario | from /box/ruby/2.6.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:287:inload' idiario | from /box/ruby/2.6.0/gems/railties-5.0.7.2/lib/rails/engine.rb:648:in block in load_config_initializer' idiario | from /box/ruby/2.6.0/gems/activesupport-5.0.7.2/lib/active_support/notifications.rb:166:ininstrument' idiario | from /box/ruby/2.6.0/gems/railties-5.0.7.2/lib/rails/engine.rb:647:in load_config_initializer' idiario | from /box/ruby/2.6.0/gems/railties-5.0.7.2/lib/rails/engine.rb:612:inblock (2 levels) in ' idiario | from /box/ruby/2.6.0/gems/railties-5.0.7.2/lib/rails/engine.rb:611:in each' idiario | from /box/ruby/2.6.0/gems/railties-5.0.7.2/lib/rails/engine.rb:611:inblock in ' idiario | from /box/ruby/2.6.0/gems/railties-5.0.7.2/lib/rails/initializable.rb:30:in instance_exec' idiario | from /box/ruby/2.6.0/gems/railties-5.0.7.2/lib/rails/initializable.rb:30:inrun' idiario | from /box/ruby/2.6.0/gems/railties-5.0.7.2/lib/rails/initializable.rb:55:in block in run_initializers' idiario | from /usr/local/lib/ruby/2.6.0/tsort.rb:228:inblock in tsort_each' idiario | from /usr/local/lib/ruby/2.6.0/tsort.rb:350:in block (2 levels) in each_strongly_connected_component' idiario | from /usr/local/lib/ruby/2.6.0/tsort.rb:422:inblock (2 levels) in each_strongly_connected_component_from' idiario | from /usr/local/lib/ruby/2.6.0/tsort.rb:422:in block (2 levels) in each_strongly_connected_component_from' idiario | from /usr/local/lib/ruby/2.6.0/tsort.rb:422:inblock (2 levels) in each_strongly_connected_component_from' idiario | from /usr/local/lib/ruby/2.6.0/tsort.rb:431:in each_strongly_connected_component_from' idiario | from /usr/local/lib/ruby/2.6.0/tsort.rb:421:inblock in each_strongly_connected_component_from' idiario | from /box/ruby/2.6.0/gems/railties-5.0.7.2/lib/rails/initializable.rb:44:in each' idiario | from /box/ruby/2.6.0/gems/railties-5.0.7.2/lib/rails/initializable.rb:44:intsort_each_child' idiario | from /usr/local/lib/ruby/2.6.0/tsort.rb:415:in call' idiario | from /usr/local/lib/ruby/2.6.0/tsort.rb:415:ineach_strongly_connected_component_from' idiario | from /usr/local/lib/ruby/2.6.0/tsort.rb:421:in block in each_strongly_connected_component_from' idiario | from /box/ruby/2.6.0/gems/railties-5.0.7.2/lib/rails/initializable.rb:44:ineach' idiario | from /box/ruby/2.6.0/gems/railties-5.0.7.2/lib/rails/initializable.rb:44:in tsort_each_child' idiario | from /usr/local/lib/ruby/2.6.0/tsort.rb:415:incall' idiario | from /usr/local/lib/ruby/2.6.0/tsort.rb:415:in each_strongly_connected_component_from' idiario | from /usr/local/lib/ruby/2.6.0/tsort.rb:421:inblock in each_strongly_connected_component_from' idiario | from /box/ruby/2.6.0/gems/railties-5.0.7.2/lib/rails/initializable.rb:44:in each' idiario | from /box/ruby/2.6.0/gems/railties-5.0.7.2/lib/rails/initializable.rb:44:intsort_each_child' idiario | from /usr/local/lib/ruby/2.6.0/tsort.rb:415:in call' idiario | from /usr/local/lib/ruby/2.6.0/tsort.rb:415:ineach_strongly_connected_component_from' idiario | from /usr/local/lib/ruby/2.6.0/tsort.rb:349:in block in each_strongly_connected_component' idiario | from /usr/local/lib/ruby/2.6.0/tsort.rb:347:ineach' idiario | from /usr/local/lib/ruby/2.6.0/tsort.rb:347:in call' idiario | from /usr/local/lib/ruby/2.6.0/tsort.rb:347:ineach_strongly_connected_component' idiario | from /usr/local/lib/ruby/2.6.0/tsort.rb:226:in tsort_each' idiario | from /usr/local/lib/ruby/2.6.0/tsort.rb:205:intsort_each' idiario | from /box/ruby/2.6.0/gems/railties-5.0.7.2/lib/rails/initializable.rb:54:in run_initializers' idiario | from /box/ruby/2.6.0/gems/railties-5.0.7.2/lib/rails/application.rb:352:ininitialize!' idiario | from /app/config/environment.rb:5:in <main>' idiario | from /app/config.ru:3:inrequire_relative' idiario | from /app/config.ru:3:in block in <main>' idiario | from /box/ruby/2.6.0/gems/rack-2.2.10/lib/rack/builder.rb:116:ineval' idiario | from /box/ruby/2.6.0/gems/rack-2.2.10/lib/rack/builder.rb:116:in new_from_string' idiario | from /box/ruby/2.6.0/gems/rack-2.2.10/lib/rack/builder.rb:105:inload_file' idiario | from /box/ruby/2.6.0/gems/rack-2.2.10/lib/rack/builder.rb:66:in parse_file' idiario | from /box/ruby/2.6.0/gems/rack-2.2.10/lib/rack/server.rb:349:inbuild_app_and_options_from_config' idiario | from /box/ruby/2.6.0/gems/rack-2.2.10/lib/rack/server.rb:249:in app' idiario | from /box/ruby/2.6.0/gems/railties-5.0.7.2/lib/rails/commands/server.rb:84:inapp' idiario | from /box/ruby/2.6.0/gems/rack-2.2.10/lib/rack/server.rb:422:in wrapped_app' idiario | from /box/ruby/2.6.0/gems/railties-5.0.7.2/lib/rails/commands/server.rb:148:inlog_to_stdout' idiario | from /box/ruby/2.6.0/gems/railties-5.0.7.2/lib/rails/commands/server.rb:102:in start' idiario | from /box/ruby/2.6.0/gems/railties-5.0.7.2/lib/rails/commands/commands_tasks.rb:90:inblock in server' idiario | from /box/ruby/2.6.0/gems/railties-5.0.7.2/lib/rails/commands/commands_tasks.rb:85:in tap' idiario | from /box/ruby/2.6.0/gems/railties-5.0.7.2/lib/rails/commands/commands_tasks.rb:85:inserver' idiario | from /box/ruby/2.6.0/gems/railties-5.0.7.2/lib/rails/commands/commands_tasks.rb:49:in run_command!' idiario | from /box/ruby/2.6.0/gems/railties-5.0.7.2/lib/rails/commands.rb:18:in
' idiario | from /box/ruby/2.6.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in require' idiario | from /box/ruby/2.6.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:inrequire' idiario | from /app/bin/rails:9:in <top (required)>' idiario | from /box/ruby/2.6.0/gems/spring-2.1.1/lib/spring/client/rails.rb:28:inload' idiario | from /box/ruby/2.6.0/gems/spring-2.1.1/lib/spring/client/rails.rb:28:in call' idiario | from /box/ruby/2.6.0/gems/spring-2.1.1/lib/spring/client/command.rb:7:incall' idiario | from /box/ruby/2.6.0/gems/spring-2.1.1/lib/spring/client.rb:30:in run' idiario | from /box/ruby/2.6.0/gems/spring-2.1.1/bin/spring:49:in<top (required)>' idiario | from /box/ruby/2.6.0/gems/spring-2.1.1/lib/spring/binstub.rb:11:in load' idiario | from /box/ruby/2.6.0/gems/spring-2.1.1/lib/spring/binstub.rb:11:in<top (required)>' idiario | from /app/bin/spring:15:in require' idiario | from /app/bin/spring:15:in<top (required)>' idiario | from bin/rails:3:in load' idiario | from bin/rails:3:in
' idiario | Exiting idiario | The Gemfile's dependencies are satisfied idiario | yarn install v1.22.22 idiario | [1/4] Resolving packages... idiario | success Already up-to-date. idiario | Done in 0.54s. idiario | Starting.. idiario | Tilt::LessTemplate is deprecated, consider switching from LESS to SCSS idiario | warning: parser/current is loading parser/ruby26, which recognizes 2.6.10-compliant syntax, but you are running 2.6.6. idiario | Please see https://github.com/whitequark/parser#compatibility-with-ruby-mri. idiario | => Booting Puma idiario | => Rails 5.0.7.2 application starting in development on http://0.0.0.0:3000 idiario | => Run rails server -h for more startup options idiario | /box/ruby/2.6.0/gems/redis-4.1.4/lib/redis/client.rb:439:in _parse_options': invalid uri scheme '' (ArgumentError) idiario | from /box/ruby/2.6.0/gems/redis-4.1.4/lib/redis/client.rb:83:ininitialize' idiario | from /box/ruby/2.6.0/gems/redis-4.1.4/lib/redis.rb:44:in new' idiario | from /box/ruby/2.6.0/gems/redis-4.1.4/lib/redis.rb:44:ininitialize' idiario | from /app/config/initializers/redis.rb:13:in new' idiario | from /app/config/initializers/redis.rb:13:in
' idiario | from /box/ruby/2.6.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:287:in load' idiario | from /box/ruby/2.6.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:287:inblock in load' idiario | from /box/ruby/2.6.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:259:in load_dependency' idiario | from /box/ruby/2.6.0/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:287:inload' idiario | from /box/ruby/2.6.0/gems/railties-5.0.7.2/lib/rails/engine.rb:648:in block in load_config_initializer' idiario | from /box/ruby/2.6.0/gems/activesupport-5.0.7.2/lib/active_support/notifications.rb:166:ininstrument' idiario | from /box/ruby/2.6.0/gems/railties-5.0.7.2/lib/rails/engine.rb:647:in load_config_initializer' idiario | from /box/ruby/2.6.0/gems/railties-5.0.7.2/lib/rails/engine.rb:612:inblock (2 levels) in ' idiario | from /box/ruby/2.6.0/gems/railties-5.0.7.2/lib/rails/engine.rb:611:in each' idiario | from /box/ruby/2.6.0/gems/railties-5.0.7.2/lib/rails/engine.rb:611:inblock in ' idiario | from /box/ruby/2.6.0/gems/railties-5.0.7.2/lib/rails/initializable.rb:30:in instance_exec' idiario | from /box/ruby/2.6.0/gems/railties-5.0.7.2/lib/rails/initializable.rb:30:inrun' idiario | from /box/ruby/2.6.0/gems/railties-5.0.7.2/lib/rails/initializable.rb:55:in block in run_initializers' idiario | from /usr/local/lib/ruby/2.6.0/tsort.rb:228:inblock in tsort_each' idiario | from /usr/local/lib/ruby/2.6.0/tsort.rb:350:in block (2 levels) in each_strongly_connected_component' idiario | from /usr/local/lib/ruby/2.6.0/tsort.rb:422:inblock (2 levels) in each_strongly_connected_component_from' idiario | from /usr/local/lib/ruby/2.6.0/tsort.rb:422:in block (2 levels) in each_strongly_connected_component_from' idiario | from /usr/local/lib/ruby/2.6.0/tsort.rb:422:inblock (2 levels) in each_strongly_connected_component_from' idiario | from /usr/local/lib/ruby/2.6.0/tsort.rb:431:in each_strongly_connected_component_from' idiario | from /usr/local/lib/ruby/2.6.0/tsort.rb:421:inblock in each_strongly_connected_component_from' idiario | from /box/ruby/2.6.0/gems/railties-5.0.7.2/lib/rails/initializable.rb:44:in each' idiario | from /box/ruby/2.6.0/gems/railties-5.0.7.2/lib/rails/initializable.rb:44:intsort_each_child' idiario | from /usr/local/lib/ruby/2.6.0/tsort.rb:415:in call' idiario | from /usr/local/lib/ruby/2.6.0/tsort.rb:415:ineach_strongly_connected_component_from' idiario | from /usr/local/lib/ruby/2.6.0/tsort.rb:421:in block in each_strongly_connected_component_from' idiario | from /box/ruby/2.6.0/gems/railties-5.0.7.2/lib/rails/initializable.rb:44:ineach' idiario | from /box/ruby/2.6.0/gems/railties-5.0.7.2/lib/rails/initializable.rb:44:in tsort_each_child' idiario | from /usr/local/lib/ruby/2.6.0/tsort.rb:415:incall' idiario | from /usr/local/lib/ruby/2.6.0/tsort.rb:415:in each_strongly_connected_component_from' idiario | from /usr/local/lib/ruby/2.6.0/tsort.rb:421:inblock in each_strongly_connected_component_from' idiario | from /box/ruby/2.6.0/gems/railties-5.0.7.2/lib/rails/initializable.rb:44:in each' idiario | from /box/ruby/2.6.0/gems/railties-5.0.7.2/lib/rails/initializable.rb:44:intsort_each_child' idiario | from /usr/local/lib/ruby/2.6.0/tsort.rb:415:in call' idiario | from /usr/local/lib/ruby/2.6.0/tsort.rb:415:ineach_strongly_connected_component_from' idiario | from /usr/local/lib/ruby/2.6.0/tsort.rb:349:in block in each_strongly_connected_component' idiario | from /usr/local/lib/ruby/2.6.0/tsort.rb:347:ineach' idiario | from /usr/local/lib/ruby/2.6.0/tsort.rb:347:in call' idiario | from /usr/local/lib/ruby/2.6.0/tsort.rb:347:ineach_strongly_connected_component' idiario | from /usr/local/lib/ruby/2.6.0/tsort.rb:226:in tsort_each' idiario | from /usr/local/lib/ruby/2.6.0/tsort.rb:205:intsort_each' idiario | from /box/ruby/2.6.0/gems/railties-5.0.7.2/lib/rails/initializable.rb:54:in run_initializers' idiario | from /box/ruby/2.6.0/gems/railties-5.0.7.2/lib/rails/application.rb:352:ininitialize!' idiario | from /app/config/environment.rb:5:in <main>' idiario | from /app/config.ru:3:inrequire_relative' idiario | from /app/config.ru:3:in block in <main>' idiario | from /box/ruby/2.6.0/gems/rack-2.2.10/lib/rack/builder.rb:116:ineval' idiario | from /box/ruby/2.6.0/gems/rack-2.2.10/lib/rack/builder.rb:116:in new_from_string' idiario | from /box/ruby/2.6.0/gems/rack-2.2.10/lib/rack/builder.rb:105:inload_file' idiario | from /box/ruby/2.6.0/gems/rack-2.2.10/lib/rack/builder.rb:66:in parse_file' idiario | from /box/ruby/2.6.0/gems/rack-2.2.10/lib/rack/server.rb:349:inbuild_app_and_options_from_config' idiario | from /box/ruby/2.6.0/gems/rack-2.2.10/lib/rack/server.rb:249:in app' idiario | from /box/ruby/2.6.0/gems/railties-5.0.7.2/lib/rails/commands/server.rb:84:inapp' idiario | from /box/ruby/2.6.0/gems/rack-2.2.10/lib/rack/server.rb:422:in wrapped_app' idiario | from /box/ruby/2.6.0/gems/railties-5.0.7.2/lib/rails/commands/server.rb:148:inlog_to_stdout' idiario | from /box/ruby/2.6.0/gems/railties-5.0.7.2/lib/rails/commands/server.rb:102:in start' idiario | from /box/ruby/2.6.0/gems/railties-5.0.7.2/lib/rails/commands/commands_tasks.rb:90:inblock in server' idiario | from /box/ruby/2.6.0/gems/railties-5.0.7.2/lib/rails/commands/commands_tasks.rb:85:in tap' idiario | from /box/ruby/2.6.0/gems/railties-5.0.7.2/lib/rails/commands/commands_tasks.rb:85:inserver' idiario | from /box/ruby/2.6.0/gems/railties-5.0.7.2/lib/rails/commands/commands_tasks.rb:49:in run_command!' idiario | from /box/ruby/2.6.0/gems/railties-5.0.7.2/lib/rails/commands.rb:18:in
' idiario | from /box/ruby/2.6.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in require' idiario | from /box/ruby/2.6.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:inrequire' idiario | from /app/bin/rails:9:in <top (required)>' idiario | from /box/ruby/2.6.0/gems/spring-2.1.1/lib/spring/client/rails.rb:28:inload' idiario | from /box/ruby/2.6.0/gems/spring-2.1.1/lib/spring/client/rails.rb:28:in call' idiario | from /box/ruby/2.6.0/gems/spring-2.1.1/lib/spring/client/command.rb:7:incall' idiario | from /box/ruby/2.6.0/gems/spring-2.1.1/lib/spring/client.rb:30:in run' idiario | from /box/ruby/2.6.0/gems/spring-2.1.1/bin/spring:49:in<top (required)>' idiario | from /box/ruby/2.6.0/gems/spring-2.1.1/lib/spring/binstub.rb:11:in load' idiario | from /box/ruby/2.6.0/gems/spring-2.1.1/lib/spring/binstub.rb:11:in<top (required)>' idiario | from /app/bin/spring:15:in require' idiario | from /app/bin/spring:15:in<top (required)>' idiario | from bin/rails:3:in load' idiario | from bin/rails:3:in
' idiario | Exiting idiario exited with code 1