LucasJPA
(usa Debian)
Enviado em 07/02/2019 - 01:58h
Boa noite
Estou tentando aprender a usar ruby e em um curso da internet o professor instruiu os comandos da instalação, fiz tudo certo, instalei o ruby, o rails, o bundle, o postgresql, mas ao executar o comando: bundle exec rails db:migrate, depois de ter criado uma nova aplicação aparece o erro, que pelo que entendi está relacionado com o banco de dados:
rails aborted!
LoadError: Error loading the 'sqlite3' Active Record adapter. Missing a gem it depends on? can't activate sqlite3 (~> 1.3.6), already activated sqlite3-1.4.0. Make sure all dependencies are added to Gemfile.
/home/araujo/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-2.0.1/lib/bundler/rubygems_integration.rb:408:in `block (2 levels) in replace_gem'
/var/lib/gems/2.5.0/gems/activerecord-5.2.2/lib/active_record/connection_adapters/sqlite3_adapter.rb:12:in `<main>'
/var/lib/gems/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
/var/lib/gems/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
/var/lib/gems/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
/var/lib/gems/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
/var/lib/gems/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
/var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `block in require'
/var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:257:in `load_dependency'
/var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `require'
/var/lib/gems/2.5.0/gems/activerecord-5.2.2/lib/active_record/connection_adapters/connection_specification.rb:191:in `spec'
/var/lib/gems/2.5.0/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:952:in `establish_connection'
/var/lib/gems/2.5.0/gems/activerecord-5.2.2/lib/active_record/connection_handling.rb:60:in `establish_connection'
/var/lib/gems/2.5.0/gems/activerecord-5.2.2/lib/active_record/railtie.rb:136:in `block (2 levels) in <class:Railtie>'
/var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/lazy_load_hooks.rb:71:in `instance_eval'
/var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/lazy_load_hooks.rb:71:in `block in execute_hook'
/var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/lazy_load_hooks.rb:62:in `with_execution_control'
/var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/lazy_load_hooks.rb:67:in `execute_hook'
/var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/lazy_load_hooks.rb:52:in `block in run_load_hooks'
/var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/lazy_load_hooks.rb:51:in `each'
/var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/lazy_load_hooks.rb:51:in `run_load_hooks'
/var/lib/gems/2.5.0/gems/activerecord-5.2.2/lib/active_record/base.rb:328:in `<module:ActiveRecord>'
/var/lib/gems/2.5.0/gems/activerecord-5.2.2/lib/active_record/base.rb:27:in `<main>'
/var/lib/gems/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
/var/lib/gems/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
/var/lib/gems/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
/var/lib/gems/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
/var/lib/gems/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
/var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `block in require'
/var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:257:in `load_dependency'
/var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `require'
/var/lib/gems/2.5.0/gems/activerecord-5.2.2/lib/active_record/railties/databases.rake:17:in `block (2 levels) in <main>'
/var/lib/gems/2.5.0/gems/railties-5.2.2/lib/rails/commands/rake/rake_command.rb:23:in `block in perform'
/var/lib/gems/2.5.0/gems/railties-5.2.2/lib/rails/commands/rake/rake_command.rb:20:in `perform'
/var/lib/gems/2.5.0/gems/railties-5.2.2/lib/rails/command.rb:48:in `invoke'
/var/lib/gems/2.5.0/gems/railties-5.2.2/lib/rails/commands.rb:18:in `<main>'
/var/lib/gems/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
/var/lib/gems/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
/var/lib/gems/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
/var/lib/gems/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
/var/lib/gems/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
/var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `block in require'
/var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:257:in `load_dependency'
/var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `require'
/home/araujo/Documentos/projetos_rails/app/bin/rails:9:in `<top (required)>'
/var/lib/gems/2.5.0/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `load'
/var/lib/gems/2.5.0/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `call'
/var/lib/gems/2.5.0/gems/spring-2.0.2/lib/spring/client/command.rb:7:in `call'
/var/lib/gems/2.5.0/gems/spring-2.0.2/lib/spring/client.rb:30:in `run'
/var/lib/gems/2.5.0/gems/spring-2.0.2/bin/spring:49:in `<top (required)>'
/var/lib/gems/2.5.0/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `load'
/var/lib/gems/2.5.0/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `<top (required)>'
/home/araujo/Documentos/projetos_rails/app/bin/spring:15:in `require'
/home/araujo/Documentos/projetos_rails/app/bin/spring:15:in `<top (required)>'
bin/rails:3:in `load'
bin/rails:3:in `<main>'
Caused by:
Gem::LoadError: can't activate sqlite3 (~> 1.3.6), already activated sqlite3-1.4.0. Make sure all dependencies are added to Gemfile.
/home/araujo/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-2.0.1/lib/bundler/rubygems_integration.rb:408:in `block (2 levels) in replace_gem'
/var/lib/gems/2.5.0/gems/activerecord-5.2.2/lib/active_record/connection_adapters/sqlite3_adapter.rb:12:in `<main>'
/var/lib/gems/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
/var/lib/gems/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
/var/lib/gems/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
/var/lib/gems/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
/var/lib/gems/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
/var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `block in require'
/var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:257:in `load_dependency'
/var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `require'
/var/lib/gems/2.5.0/gems/activerecord-5.2.2/lib/active_record/connection_adapters/connection_specification.rb:191:in `spec'
/var/lib/gems/2.5.0/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:952:in `establish_connection'
/var/lib/gems/2.5.0/gems/activerecord-5.2.2/lib/active_record/connection_handling.rb:60:in `establish_connection'
/var/lib/gems/2.5.0/gems/activerecord-5.2.2/lib/active_record/railtie.rb:136:in `block (2 levels) in <class:Railtie>'
/var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/lazy_load_hooks.rb:71:in `instance_eval'
/var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/lazy_load_hooks.rb:71:in `block in execute_hook'
/var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/lazy_load_hooks.rb:62:in `with_execution_control'
/var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/lazy_load_hooks.rb:67:in `execute_hook'
/var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/lazy_load_hooks.rb:52:in `block in run_load_hooks'
/var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/lazy_load_hooks.rb:51:in `each'
/var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/lazy_load_hooks.rb:51:in `run_load_hooks'
/var/lib/gems/2.5.0/gems/activerecord-5.2.2/lib/active_record/base.rb:328:in `<module:ActiveRecord>'
/var/lib/gems/2.5.0/gems/activerecord-5.2.2/lib/active_record/base.rb:27:in `<main>'
/var/lib/gems/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
/var/lib/gems/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
/var/lib/gems/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
/var/lib/gems/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
/var/lib/gems/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
/var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `block in require'
/var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:257:in `load_dependency'
/var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `require'
/var/lib/gems/2.5.0/gems/activerecord-5.2.2/lib/active_record/railties/databases.rake:17:in `block (2 levels) in <main>'
/var/lib/gems/2.5.0/gems/railties-5.2.2/lib/rails/commands/rake/rake_command.rb:23:in `block in perform'
/var/lib/gems/2.5.0/gems/railties-5.2.2/lib/rails/commands/rake/rake_command.rb:20:in `perform'
/var/lib/gems/2.5.0/gems/railties-5.2.2/lib/rails/command.rb:48:in `invoke'
/var/lib/gems/2.5.0/gems/railties-5.2.2/lib/rails/commands.rb:18:in `<main>'
/var/lib/gems/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
/var/lib/gems/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
/var/lib/gems/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
/var/lib/gems/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
/var/lib/gems/2.5.0/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
/var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `block in require'
/var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:257:in `load_dependency'
/var/lib/gems/2.5.0/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `require'
/home/araujo/Documentos/projetos_rails/app/bin/rails:9:in `<top (required)>'
/var/lib/gems/2.5.0/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `load'
/var/lib/gems/2.5.0/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `call'
/var/lib/gems/2.5.0/gems/spring-2.0.2/lib/spring/client/command.rb:7:in `call'
/var/lib/gems/2.5.0/gems/spring-2.0.2/lib/spring/client.rb:30:in `run'
/var/lib/gems/2.5.0/gems/spring-2.0.2/bin/spring:49:in `<top (required)>'
/var/lib/gems/2.5.0/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `load'
/var/lib/gems/2.5.0/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `<top (required)>'
/home/araujo/Documentos/projetos_rails/app/bin/spring:15:in `require'
/home/araujo/Documentos/projetos_rails/app/bin/spring:15:in `<top (required)>'
bin/rails:3:in `load'
bin/rails:3:in `<main>'
Tasks: TOP => db:migrate => db:load_config
(See full trace by running task with --trace)
O erro é bem grande e não sei o que causa isso nem como resolver, já agradeço a ajuda de todos.