Erro instalação do idiario

Olá pessoal estou com um erro na instalação do idicario.
quando executo o comando: bundle exec rake db:migrate, ocorre o seguinte erro.

          Deprecation warning: Expected string default value for '--jbuilder'; got true (boolean).
This will be rejected in the future unless you explicitly pass the options `check_default_type: false` or call `allow_incompatible_default_type!` in your code
You can silence deprecations warning by setting the environment variable THOR_SILENCE_DEPRECATION.
Deprecation warning: Expected string default value for '--serializer'; got true (boolean).
This will be rejected in the future unless you explicitly pass the options `check_default_type: false` or call `allow_incompatible_default_type!` in your code
You can silence deprecations warning by setting the environment variable THOR_SILENCE_DEPRECATION.
W, [2020-07-26T17:12:09.610958 #5585]  WARN -- Skylight: [SKYLIGHT] [4.3.1] Running Skylight in development mode. No data will be reported until you deploy your app.
(To disable this message for all local apps, run `skylight disable_dev_warning`.)
/root/i-diario/config/initializers/ssl_hotfix.rb:1: warning: already initialized constant OpenSSL::SSL::VERIFY_PEER
rake aborted!
Devise.secret_key was not set. Please add the following to your Devise initializer:

  config.secret_key = 'bdd53a691bdfaf760beafea65f4f9f436f6db30dd119e1556c7d9f12d15094a2d197271a011cd20aca6e02fd3bd532da51ed5a65acf57038c8e22ecbd1acfd3b'

Please ensure you restarted your application after installing Devise or setting the key.
/usr/local/rvm/gems/ruby-2.3.7/gems/devise-3.5.1/lib/devise/rails/routes.rb:480:in `raise_no_secret_key'
/usr/local/rvm/gems/ruby-2.3.7/gems/devise-3.5.1/lib/devise/rails/routes.rb:209:in `devise_for'
/root/i-diario/config/routes.rb:10:in `block (2 levels) in <top (required)>'
/usr/local/rvm/gems/ruby-2.3.7/bundler/gems/route_translator-d9f8ce929bca/lib/route_translator/extensions/mapper.rb:8:in `localized'
/root/i-diario/config/routes.rb:9:in `block in <top (required)>'
/usr/local/rvm/gems/ruby-2.3.7/gems/actionpack-4.2.11.1/lib/action_dispatch/routing/route_set.rb:432:in `instance_exec'
/usr/local/rvm/gems/ruby-2.3.7/gems/actionpack-4.2.11.1/lib/action_dispatch/routing/route_set.rb:432:in `eval_block'
/usr/local/rvm/gems/ruby-2.3.7/gems/actionpack-4.2.11.1/lib/action_dispatch/routing/route_set.rb:410:in `draw'
/root/i-diario/config/routes.rb:3:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.3.7/gems/activesupport-4.2.11.1/lib/active_support/dependencies.rb:268:in `load'
/usr/local/rvm/gems/ruby-2.3.7/gems/activesupport-4.2.11.1/lib/active_support/dependencies.rb:268:in `block in load'
/usr/local/rvm/gems/ruby-2.3.7/gems/activesupport-4.2.11.1/lib/active_support/dependencies.rb:240:in `load_dependency'
/usr/local/rvm/gems/ruby-2.3.7/gems/activesupport-4.2.11.1/lib/active_support/dependencies.rb:268:in `load'
/usr/local/rvm/gems/ruby-2.3.7/gems/railties-4.2.11.1/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
/usr/local/rvm/gems/ruby-2.3.7/gems/railties-4.2.11.1/lib/rails/application/routes_reloader.rb:40:in `each'
/usr/local/rvm/gems/ruby-2.3.7/gems/railties-4.2.11.1/lib/rails/application/routes_reloader.rb:40:in `load_paths'
/usr/local/rvm/gems/ruby-2.3.7/gems/railties-4.2.11.1/lib/rails/application/routes_reloader.rb:16:in `reload!'
/usr/local/rvm/gems/ruby-2.3.7/gems/railties-4.2.11.1/lib/rails/application/routes_reloader.rb:26:in `block in updater'
/usr/local/rvm/gems/ruby-2.3.7/gems/activesupport-4.2.11.1/lib/active_support/file_update_checker.rb:75:in `execute'
/usr/local/rvm/gems/ruby-2.3.7/gems/railties-4.2.11.1/lib/rails/application/routes_reloader.rb:27:in `updater'
/usr/local/rvm/gems/ruby-2.3.7/gems/railties-4.2.11.1/lib/rails/application/routes_reloader.rb:7:in `execute_if_updated'
/usr/local/rvm/gems/ruby-2.3.7/gems/railties-4.2.11.1/lib/rails/application/finisher.rb:69:in `block in <module:Finisher>'
/usr/local/rvm/gems/ruby-2.3.7/gems/railties-4.2.11.1/lib/rails/initializable.rb:30:in `instance_exec'
/usr/local/rvm/gems/ruby-2.3.7/gems/railties-4.2.11.1/lib/rails/initializable.rb:30:in `run'
/usr/local/rvm/gems/ruby-2.3.7/gems/railties-4.2.11.1/lib/rails/initializable.rb:55:in `block in run_initializers'
/usr/local/rvm/gems/ruby-2.3.7/gems/railties-4.2.11.1/lib/rails/initializable.rb:54:in `run_initializers'
/usr/local/rvm/gems/ruby-2.3.7/gems/railties-4.2.11.1/lib/rails/application.rb:352:in `initialize!'
/root/i-diario/config/environment.rb:5:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.3.7/gems/skylight-core-4.3.1/lib/skylight/core/probes.rb:118:in `require'
/usr/local/rvm/gems/ruby-2.3.7/gems/skylight-core-4.3.1/lib/skylight/core/probes.rb:118:in `require'
/usr/local/rvm/gems/ruby-2.3.7/gems/activesupport-4.2.11.1/lib/active_support/dependencies.rb:274:in `block in require'
/usr/local/rvm/gems/ruby-2.3.7/gems/activesupport-4.2.11.1/lib/active_support/dependencies.rb:240:in `load_dependency'
/usr/local/rvm/gems/ruby-2.3.7/gems/activesupport-4.2.11.1/lib/active_support/dependencies.rb:274:in `require'
/usr/local/rvm/gems/ruby-2.3.7/gems/railties-4.2.11.1/lib/rails/application.rb:328:in `require_environment!'
/usr/local/rvm/gems/ruby-2.3.7/gems/railties-4.2.11.1/lib/rails/application.rb:457:in `block in run_tasks_blocks'
/usr/local/rvm/gems/ruby-2.3.7/bin/ruby_executable_hooks:24:in `eval'
/usr/local/rvm/gems/ruby-2.3.7/bin/ruby_executable_hooks:24:in `<main>'
Tasks: TOP => db:migrate => db:migrate_dbs => environment
(See full trace by running task with --trace)

Boa noite, vc setou secret_key_base: CHAVE_SECRETA em config/secrets.yml ?
(onde CHAVE_SECRETA vai ser o resultado de rodar bundle exec rake secret)

Sim Joel eu fiz isso,

problema acontece em desenvolvimento ou producao ?

problema acontece em ambiente de produção.

pode postar aqui o conteudo do seu config/secrets.yml (lembrar apagar ou trocar os valores reales das chaves antes de postar)

logo entrar no rails console (rodando rails console) e postar o resultado de rodar Rails.env

Meu amigo reinicie do zero novamente e esbarrei no mesmo erro.
segue o conteúdo do arquivo.

production:

secret_key_base: 8c555290deffb56c727ebdf5bxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

consegui passar do erro agora tem esse erro quando acesso na url
Puma caught this error: Missing secret_token and secret_key_base for ‘development’ environment, set these values in config/secrets.yml (RuntimeError)
/usr/local/rvm/gems/ruby-2.3.7/gems/railties-4.2.11.1/lib/rails/application.rb:534:in validate_secret_key_config!' /usr/local/rvm/gems/ruby-2.3.7/gems/railties-4.2.11.1/lib/rails/application.rb:246:in env_config’
/usr/local/rvm/gems/ruby-2.3.7/gems/railties-4.2.11.1/lib/rails/engine.rb:514:in call' /usr/local/rvm/gems/ruby-2.3.7/gems/railties-4.2.11.1/lib/rails/application.rb:165:in call’
/usr/local/rvm/gems/ruby-2.3.7/gems/rack-1.6.11/lib/rack/content_length.rb:15:in call' /usr/local/rvm/gems/ruby-2.3.7/gems/puma-4.3.1/lib/puma/configuration.rb:228:in call’
/usr/local/rvm/gems/ruby-2.3.7/gems/puma-4.3.1/lib/puma/server.rb:681:in handle_request' /usr/local/rvm/gems/ruby-2.3.7/gems/puma-4.3.1/lib/puma/server.rb:472:in process_client’
/usr/local/rvm/gems/ruby-2.3.7/gems/puma-4.3.1/lib/puma/server.rb:328:in block in run' /usr/local/rvm/gems/ruby-2.3.7/gems/puma-4.3.1/lib/puma/thread_pool.rb:134:in block in spawn_thread’

Pelo visto você está inicializando o puma como development, então deve ter o token para esse environment, ou então iniciar o puma como production.

Para iniciar como production preciso dropar os bancos ou executo outro comando diferente de :
bundle exec rails server -b 0.0.0.0 -p 3000

Para vc entender melhor:

Se vc olhar aqui https://github.com/portabilis/i-diario/tree/master/config/environments tem varios arquivos de configuracao com nomes diferentes.

Cada configuracao vai pegar em dependencia do valor que tenha a variavel de embiente RAILS_ENV.

Ou seja, se vc fizer RAILS_ENV=production bundle exec rails server vc vai iniciar o servidor como producao ou o que é a mesma coisa usando as configuracoes setadas em config/environments/production.rb

Ai depende de vc como setar essa variavel de entorno.
(por padrao ela sempre é “development”)

Massa Joel já havia feito isso ai, agora tenho outro erro
na pagina aparece : An unhandled lowlevel error occurred. The application logs may have details.

e o log no terminal aparece :
2020-08-05 22:12:43 -0300: Rack app error handling request { GET / }
#<RuntimeError: Missing secret_token and secret_key_base for ‘production’ environment, set these values in config/secrets.yml>
/usr/local/rvm/gems/ruby-2.3.7/gems/railties-4.2.11.1/lib/rails/application.rb:534:in validate_secret_key_config!' /usr/local/rvm/gems/ruby-2.3.7/gems/railties-4.2.11.1/lib/rails/application.rb:246:in env_config’
/usr/local/rvm/gems/ruby-2.3.7/gems/railties-4.2.11.1/lib/rails/engine.rb:514:in call' /usr/local/rvm/gems/ruby-2.3.7/gems/railties-4.2.11.1/lib/rails/application.rb:165:in call’
/usr/local/rvm/gems/ruby-2.3.7/gems/rack-1.6.11/lib/rack/content_length.rb:15:in call' /usr/local/rvm/gems/ruby-2.3.7/gems/puma-4.3.1/lib/puma/configuration.rb:228:in call’
/usr/local/rvm/gems/ruby-2.3.7/gems/puma-4.3.1/lib/puma/server.rb:681:in handle_request' /usr/local/rvm/gems/ruby-2.3.7/gems/puma-4.3.1/lib/puma/server.rb:472:in process_client’
/usr/local/rvm/gems/ruby-2.3.7/gems/puma-4.3.1/lib/puma/server.rb:328:in block in run' /usr/local/rvm/gems/ruby-2.3.7/gems/puma-4.3.1/lib/puma/thread_pool.rb:134:in block in spawn_thread’

No secrets.yml tens que respeitar os 2 espacos antes da palavra secret_key_base:
Ex:

development:
  secret_key_base: CHAVE_SECRETA_PARA_DEVELOPMENT
production:
  secret_key_base: CHAVE_SECRETA_PARA_PRODUCTION

valeu demais funcionou aqui

1 Curtida