質問編集履歴

4 コード

sairito0628

sairito0628 score 9

2019/02/06 17:28  投稿

Error loading the 'sqlite3' Active Record adapter. Missing a gem it depends on?エラーで困ってます
teratailを初めて使ったので、質問の仕方に失礼がありましたら申し訳ございません。  
Puma caught this error: 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. (LoadError)
/home/ec2-user/.rvm/rubies/ruby-2.5.3/lib/ruby/site_ruby/2.5.0/bundler/rubygems_integration.rb:408:in `block (2 levels) in replace_gem'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/connection_adapters/sqlite3_adapter.rb:12:in `<main>'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `block in require'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:257:in `load_dependency'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `require'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/connection_adapters/connection_specification.rb:191:in `spec'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:952:in `establish_connection'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/connection_handling.rb:60:in `establish_connection'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/railtie.rb:136:in `block (2 levels) in <class:Railtie>'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/lazy_load_hooks.rb:71:in `instance_eval'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/lazy_load_hooks.rb:71:in `block in execute_hook'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/lazy_load_hooks.rb:62:in `with_execution_control'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/lazy_load_hooks.rb:67:in `execute_hook'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/lazy_load_hooks.rb:52:in `block in run_load_hooks'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/lazy_load_hooks.rb:51:in `each'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/lazy_load_hooks.rb:51:in `run_load_hooks'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/base.rb:328:in `<module:ActiveRecord>'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/base.rb:27:in `<main>'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `block in require'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:257:in `load_dependency'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `require'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/query_cache.rb:29:in `run'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/execution_wrapper.rb:27:in `before'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:426:in `block in make_lambda'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:198:in `block (2 levels) in halting'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:606:in `block (2 levels) in default_terminator'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:605:in `catch'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:605:in `block in default_terminator'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:199:in `block in halting'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:513:in `block in invoke_before'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:513:in `each'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:513:in `invoke_before'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:131:in `run_callbacks'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/execution_wrapper.rb:110:in `run!'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/execution_wrapper.rb:72:in `block in run!'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/execution_wrapper.rb:69:in `tap'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/execution_wrapper.rb:69:in `run!'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/actionpack-5.2.2/lib/action_dispatch/middleware/executor.rb:12:in `call'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/actionpack-5.2.2/lib/action_dispatch/middleware/static.rb:127:in `call'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/rack-2.0.6/lib/rack/sendfile.rb:111:in `call'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/railties-5.2.2/lib/rails/engine.rb:524:in `call'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/puma-3.12.0/lib/puma/configuration.rb:225:in `call'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/puma-3.12.0/lib/puma/server.rb:658:in `handle_request'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/puma-3.12.0/lib/puma/server.rb:472:in `process_client'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/puma-3.12.0/lib/puma/server.rb:332:in `block in run'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/puma-3.12.0/lib/puma/thread_pool.rb:133:in `block in spawn_thread'
### 試したこと
Puma caught this error: 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. (LoadError)
とかいてあったので、
$gem 'sqlite3', '~> 1.3.6'
を打ってみたが、
gem 'sqlite3', '~> 1.3.6'
ERROR: While executing gem ... (Gem::CommandLineError)
   Unknown command sqlite3,
こう出てしまい、ダメだった
https://teratail.com/questions/172684
このページをみて試してみた
  • Ruby on Rails

    12523 questions

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

3 コード

sairito0628

sairito0628 score 9

2019/02/06 17:24  投稿

Error loading the 'sqlite3' Active Record adapter. Missing a gem it depends on?エラーで困ってます
### 前提・実現したいこと  
 
ここに質問の内容を詳しく書いてください。  
(例)PHP(CakePHP)で●●なシステムを作っています。  
■■な機能を実装中に以下のエラーメッセージが発生しました。  
 
### 発生している問題・エラーメッセージ  
 
```  
 
 
 
 
 
 
 
 
 
 
Puma caught this error: 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. (LoadError)
/home/ec2-user/.rvm/rubies/ruby-2.5.3/lib/ruby/site_ruby/2.5.0/bundler/rubygems_integration.rb:408:in `block (2 levels) in replace_gem'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/connection_adapters/sqlite3_adapter.rb:12:in `<main>'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `block in require'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:257:in `load_dependency'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `require'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/connection_adapters/connection_specification.rb:191:in `spec'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:952:in `establish_connection'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/connection_handling.rb:60:in `establish_connection'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/railtie.rb:136:in `block (2 levels) in <class:Railtie>'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/lazy_load_hooks.rb:71:in `instance_eval'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/lazy_load_hooks.rb:71:in `block in execute_hook'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/lazy_load_hooks.rb:62:in `with_execution_control'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/lazy_load_hooks.rb:67:in `execute_hook'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/lazy_load_hooks.rb:52:in `block in run_load_hooks'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/lazy_load_hooks.rb:51:in `each'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/lazy_load_hooks.rb:51:in `run_load_hooks'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/base.rb:328:in `<module:ActiveRecord>'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/base.rb:27:in `<main>'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `block in require'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:257:in `load_dependency'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `require'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/query_cache.rb:29:in `run'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/execution_wrapper.rb:27:in `before'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:426:in `block in make_lambda'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:198:in `block (2 levels) in halting'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:606:in `block (2 levels) in default_terminator'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:605:in `catch'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:605:in `block in default_terminator'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:199:in `block in halting'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:513:in `block in invoke_before'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:513:in `each'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:513:in `invoke_before'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:131:in `run_callbacks'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/execution_wrapper.rb:110:in `run!'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/execution_wrapper.rb:72:in `block in run!'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/execution_wrapper.rb:69:in `tap'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/execution_wrapper.rb:69:in `run!'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/actionpack-5.2.2/lib/action_dispatch/middleware/executor.rb:12:in `call'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/actionpack-5.2.2/lib/action_dispatch/middleware/static.rb:127:in `call'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/rack-2.0.6/lib/rack/sendfile.rb:111:in `call'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/railties-5.2.2/lib/rails/engine.rb:524:in `call'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/puma-3.12.0/lib/puma/configuration.rb:225:in `call'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/puma-3.12.0/lib/puma/server.rb:658:in `handle_request'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/puma-3.12.0/lib/puma/server.rb:472:in `process_client'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/puma-3.12.0/lib/puma/server.rb:332:in `block in run'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/puma-3.12.0/lib/puma/thread_pool.rb:133:in `block in spawn_thread'
エラーメッセージ  
```  
 
### 該当のソースコード  
 
```ここに言語名を入力  
ソースコード`````````ここに言語を入力  
ここに言語を入力  
```  
ここに言語を入力  
```  
コード  
```rails  
```  
### 試したこと
Puma caught this error: 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. (LoadError)
とかいてあったので、
$gem 'sqlite3', '~> 1.3.6'
を打ってみたが、
gem 'sqlite3', '~> 1.3.6'
ERROR: While executing gem ... (Gem::CommandLineError)
   Unknown command sqlite3,
こう出てしまい、ダメだった
https://teratail.com/questions/172684
このページをみて試してみた
ここに問題に対して試したことを記載してください。
### 補足情報(FW/ツールのバージョンなど)
.
ここにより詳細な情報を記載してください。
  • Ruby on Rails

    12523 questions

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

2 コード

sairito0628

sairito0628 score 9

2019/02/06 17:18  投稿

Error loading the 'sqlite3' Active Record adapter. Missing a gem it depends on?エラーで困ってます
### 前提・実現したいこと
ここに質問の内容を詳しく書いてください。
(例)PHP(CakePHP)で●●なシステムを作っています。
■■な機能を実装中に以下のエラーメッセージが発生しました。
### 発生している問題・エラーメッセージ
```Puma caught this error: 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. (LoadError)
```
Puma caught this error: 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. (LoadError)
/home/ec2-user/.rvm/rubies/ruby-2.5.3/lib/ruby/site_ruby/2.5.0/bundler/rubygems_integration.rb:408:in `block (2 levels) in replace_gem'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/connection_adapters/sqlite3_adapter.rb:12:in `<main>'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `block in require'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:257:in `load_dependency'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `require'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/connection_adapters/connection_specification.rb:191:in `spec'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:952:in `establish_connection'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/connection_handling.rb:60:in `establish_connection'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/railtie.rb:136:in `block (2 levels) in <class:Railtie>'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/lazy_load_hooks.rb:71:in `instance_eval'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/lazy_load_hooks.rb:71:in `block in execute_hook'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/lazy_load_hooks.rb:62:in `with_execution_control'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/lazy_load_hooks.rb:67:in `execute_hook'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/lazy_load_hooks.rb:52:in `block in run_load_hooks'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/lazy_load_hooks.rb:51:in `each'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/lazy_load_hooks.rb:51:in `run_load_hooks'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/base.rb:328:in `<module:ActiveRecord>'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/base.rb:27:in `<main>'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `block in require'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:257:in `load_dependency'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `require'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/query_cache.rb:29:in `run'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/execution_wrapper.rb:27:in `before'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:426:in `block in make_lambda'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:198:in `block (2 levels) in halting'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:606:in `block (2 levels) in default_terminator'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:605:in `catch'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:605:in `block in default_terminator'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:199:in `block in halting'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:513:in `block in invoke_before'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:513:in `each'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:513:in `invoke_before'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:131:in `run_callbacks'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/execution_wrapper.rb:110:in `run!'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/execution_wrapper.rb:72:in `block in run!'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/execution_wrapper.rb:69:in `tap'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/execution_wrapper.rb:69:in `run!'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/actionpack-5.2.2/lib/action_dispatch/middleware/executor.rb:12:in `call'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/actionpack-5.2.2/lib/action_dispatch/middleware/static.rb:127:in `call'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/rack-2.0.6/lib/rack/sendfile.rb:111:in `call'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/railties-5.2.2/lib/rails/engine.rb:524:in `call'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/puma-3.12.0/lib/puma/configuration.rb:225:in `call'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/puma-3.12.0/lib/puma/server.rb:658:in `handle_request'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/puma-3.12.0/lib/puma/server.rb:472:in `process_client'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/puma-3.12.0/lib/puma/server.rb:332:in `block in run'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/puma-3.12.0/lib/puma/thread_pool.rb:133:in `block in spawn_thread'
エラーメッセージ
```
### 該当のソースコード
```ここに言語名を入力
ソースコード`````````ここに言語を入力
ここに言語を入力
```rails
```
ここに言語を入力
```
コード
```rails
```
### 試したこと
Puma caught this error: 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. (LoadError)
とかいてあったので、
$gem 'sqlite3', '~> 1.3.6'
を打ってみたが、
gem 'sqlite3', '~> 1.3.6'
ERROR: While executing gem ... (Gem::CommandLineError)
   Unknown command sqlite3,
こう出てしまい、ダメだった
https://teratail.com/questions/172684
このページをみて試してみた
ここに問題に対して試したことを記載してください。
### 補足情報(FW/ツールのバージョンなど)
.
ここにより詳細な情報を記載してください。
  • Ruby on Rails

    12523 questions

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

1 コード

sairito0628

sairito0628 score 9

2019/02/06 17:16  投稿

railsについて質問で
Error loading the 'sqlite3' Active Record adapter. Missing a gem it depends on?エラーで困ってま
### 前提・実現したいこと
ここに質問の内容を詳しく書いてください。
(例)PHP(CakePHP)で●●なシステムを作っています。
■■な機能を実装中に以下のエラーメッセージが発生しました。
### 発生している問題・エラーメッセージ
```Puma caught this error: 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. (LoadError)
/home/ec2-user/.rvm/rubies/ruby-2.5.3/lib/ruby/site_ruby/2.5.0/bundler/rubygems_integration.rb:408:in `block (2 levels) in replace_gem'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/connection_adapters/sqlite3_adapter.rb:12:in `<main>'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `block in require'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:257:in `load_dependency'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `require'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/connection_adapters/connection_specification.rb:191:in `spec'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:952:in `establish_connection'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/connection_handling.rb:60:in `establish_connection'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/railtie.rb:136:in `block (2 levels) in <class:Railtie>'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/lazy_load_hooks.rb:71:in `instance_eval'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/lazy_load_hooks.rb:71:in `block in execute_hook'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/lazy_load_hooks.rb:62:in `with_execution_control'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/lazy_load_hooks.rb:67:in `execute_hook'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/lazy_load_hooks.rb:52:in `block in run_load_hooks'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/lazy_load_hooks.rb:51:in `each'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/lazy_load_hooks.rb:51:in `run_load_hooks'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/base.rb:328:in `<module:ActiveRecord>'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/base.rb:27:in `<main>'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `block in require'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:257:in `load_dependency'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/dependencies.rb:291:in `require'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/query_cache.rb:29:in `run'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/execution_wrapper.rb:27:in `before'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:426:in `block in make_lambda'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:198:in `block (2 levels) in halting'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:606:in `block (2 levels) in default_terminator'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:605:in `catch'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:605:in `block in default_terminator'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:199:in `block in halting'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:513:in `block in invoke_before'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:513:in `each'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:513:in `invoke_before'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/callbacks.rb:131:in `run_callbacks'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/execution_wrapper.rb:110:in `run!'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/execution_wrapper.rb:72:in `block in run!'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/execution_wrapper.rb:69:in `tap'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.2/lib/active_support/execution_wrapper.rb:69:in `run!'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/actionpack-5.2.2/lib/action_dispatch/middleware/executor.rb:12:in `call'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/actionpack-5.2.2/lib/action_dispatch/middleware/static.rb:127:in `call'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/rack-2.0.6/lib/rack/sendfile.rb:111:in `call'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/railties-5.2.2/lib/rails/engine.rb:524:in `call'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/puma-3.12.0/lib/puma/configuration.rb:225:in `call'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/puma-3.12.0/lib/puma/server.rb:658:in `handle_request'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/puma-3.12.0/lib/puma/server.rb:472:in `process_client'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/puma-3.12.0/lib/puma/server.rb:332:in `block in run'
/home/ec2-user/.rvm/gems/ruby-2.5.3/gems/puma-3.12.0/lib/puma/thread_pool.rb:133:in `block in spawn_thread'
エラーメッセージ
```
### 該当のソースコード
```ここに言語名を入力
ソースコード`````````ここに言語を入力
ここに言語を入力
```rails
ここに言語を入力
```
コード
```rails
```
### 試したこと
Puma caught this error: 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. (LoadError)
とかいてあったので、
$gem 'sqlite3', '~> 1.3.6'
を打ってみたが、
gem 'sqlite3', '~> 1.3.6'
ERROR: While executing gem ... (Gem::CommandLineError)
Unknown command sqlite3,
こう出てしまい、ダメだった
https://teratail.com/questions/172684
このページをみて試してみた
ここに問題に対して試したことを記載してください。
### 補足情報(FW/ツールのバージョンなど)
.
ここにより詳細な情報を記載してください。
  • Ruby on Rails

    12523 questions

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

思考するエンジニアのためのQ&Aサイト「teratail」について詳しく知る