capistranoを実装して自動デプロイをしようとしたら下記のようなエラーが発生しました。
Your version of SQLite (3.7.17) is too old. Active Record supports SQLite >= 3.8.
terminal
1#ローカルのアプリのディレクトリ 2$bundle exec cap production deploy 3Your version of SQLite (3.7.17) is too old. Active Record supports SQLite >= 3.8.
試したこと
エラーメッセージを調べてsqlite3の新しいバージョンをインストールしました。参考記事
terminal
1#EC2ターミナル 2$ sqlite3 --version 33.30.1 2019-10-10 20:19:45 18db032d058f1436ce3dea84081f4ee5a0f2259ad97301d43c426bc7f3df1b0b
その後もう一度デプロイを試みましたが同じようなエラーが出てしまいました。
terminal
1$bundle exec cap production deploy 200:42 deploy:migrating 3 01 $HOME/.rbenv/bin/rbenv exec bundle exec rake db:migrate 4 5 01 rake aborted! 6 01 Your version of SQLite (3.7.17) is too old. Active Record supports SQLite >= 3.8. 7 01 /var/www/rails/smile_mail/shared/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/sqlite3_adapter.rb:340:in `check_version' 8 01 /var/www/rails/smile_mail/shared/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:888:in `block in new_connection' 9 01 /var/www/rails/smile_mail/shared/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:887:in `tap' 10 01 /var/www/rails/smile_mail/shared/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:887:in `new_connection' 11 01 /var/www/rails/smile_mail/shared/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:931:in `checkout_new_connection' 12 01 /var/www/rails/smile_mail/shared/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:910:in `try_to_checkout_new_connection' 13 01 /var/www/rails/smile_mail/shared/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:871:in `acquire_connection' 14 01 /var/www/rails/smile_mail/shared/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:593:in `checkout' 15 01 /var/www/rails/smile_mail/shared/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:437:in `connection' 16 01 /var/www/rails/smile_mail/shared/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:1119:in `retrieve_connection' 17 01 /var/www/rails/smile_mail/shared/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_handling.rb:221:in `retrieve_connection' 18 01 /var/www/rails/smile_mail/shared/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/connection_handling.rb:189:in `connection' 19 01 /var/www/rails/smile_mail/shared/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/tasks/database_tasks.rb:238:in `migrate' 20 01 /var/www/rails/smile_mail/shared/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/railties/databases.rake:86:in `block (3 levels) in <main>' 21 01 /var/www/rails/smile_mail/shared/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/railties/databases.rake:84:in `each' 22 01 /var/www/rails/smile_mail/shared/bundle/ruby/2.7.0/gems/activerecord-6.0.3.4/lib/active_record/railties/databases.rake:84:in `block (2 levels) in <main>' 23 01 /var/www/rails/smile_mail/shared/bundle/ruby/2.7.0/gems/rake-13.0.1/exe/rake:27:in `<top (required)>' 24 01 /home/ec2-user/.rbenv/versions/2.7.2/bin/bundle:23:in `load' 25 01 /home/ec2-user/.rbenv/versions/2.7.2/bin/bundle:23:in `<main>' 26 01 Tasks: TOP => db:migrate 27 01 (See full trace by running task with --trace) 28#<Thread:0x00007fba91873e00 /Users/tsuchiyaoh/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/sshkit-1.21.0/lib/sshkit/runners/parallel.rb:10 run> terminated with exception (report_on_exception is true): 29Traceback (most recent call last): 30 13: from /Users/tsuchiyaoh/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/sshkit-1.21.0/lib/sshkit/runners/parallel.rb:12:in `block (2 levels) in execute' 31 12: from /Users/tsuchiyaoh/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/sshkit-1.21.0/lib/sshkit/backends/abstract.rb:31:in `run' 32 11: from /Users/tsuchiyaoh/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/sshkit-1.21.0/lib/sshkit/backends/abstract.rb:31:in `instance_exec' 33 10: from /Users/tsuchiyaoh/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/capistrano-rails-1.6.1/lib/capistrano/tasks/migrations.rake:23:in `block (3 levels) in <top (required)>' 34 9: from /Users/tsuchiyaoh/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/sshkit-1.21.0/lib/sshkit/backends/abstract.rb:92:in `within' 35 8: from /Users/tsuchiyaoh/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/capistrano-rails-1.6.1/lib/capistrano/tasks/migrations.rake:24:in `block (4 levels) in <top (required)>' 36 7: from /Users/tsuchiyaoh/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/sshkit-1.21.0/lib/sshkit/backends/abstract.rb:100:in `with' 37 6: from /Users/tsuchiyaoh/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/capistrano-rails-1.6.1/lib/capistrano/tasks/migrations.rake:25:in `block (5 levels) in <top (required)>' 38 5: from /Users/tsuchiyaoh/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/sshkit-1.21.0/lib/sshkit/backends/abstract.rb:80:in `execute' 39 4: from /Users/tsuchiyaoh/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/sshkit-1.21.0/lib/sshkit/backends/abstract.rb:148:in `create_command_and_execute' 40 3: from /Users/tsuchiyaoh/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/sshkit-1.21.0/lib/sshkit/backends/abstract.rb:148:in `tap' 41 2: from /Users/tsuchiyaoh/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/sshkit-1.21.0/lib/sshkit/backends/abstract.rb:148:in `block in create_command_and_execute' 42 1: from /Users/tsuchiyaoh/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/sshkit-1.21.0/lib/sshkit/backends/netssh.rb:170:in `execute_command' 43/Users/tsuchiyaoh/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/sshkit-1.21.0/lib/sshkit/command.rb:97:in `exit_status=': rake exit status: 1 (SSHKit::Command::Failed) 44rake stdout: Nothing written
もし原因・対策をお分かりの方がいましたらお力をお貸しください
何卒よろしくお願いいたします。
あなたの回答
tips
プレビュー