LoginSignup
8
2

More than 3 years have passed since last update.

ruby2.7.1, rails 6.0.3でrailsコマンドを叩くと大量の警告が出た話

Posted at

ruby3以降でrb_check_safe_objが削除されるらしくsqlite3が大量の警告を吐いて邪魔だったので対処した話

> rails test
Running via Spring preloader in process *
**/sqlite3/database.rb:89: warning: rb_check_safe_obj will be removed in Ruby 3.0

対応

sqlite3のバージョンを1.4.2以降に更新

# Gemfile
gem 'sqlite3', '1.4.2'
bundle update

対応後

> rails test
Running via Spring preloader in process *
Started with run options --seed *

  5/5: [======] 100% Time: 00:00:01, Time: 00:00:01
8
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
2