In Ruby v3.3 the following warning occurs when launching a rails console:
/Users/ben/.rbenv/versions/3.3.1/lib/ruby/gems/3.3.0/gems/bootsnap- \
1.18.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30: warning: \
/Users/ben/.rbenv/versions/3.3.1/lib/ruby/3.3.0/csv.rb was loaded from the standard library, \
but will no longer be part of the default gems since Ruby 3.4.0. Add csv to your Gemfile or gemspec.
Solution
Add csv gem as a dependency to rails_db. Console issues go away with this change.
The fix can be tested by executing rails new in a Ruby 3.3.1 environment and than adding the rails_db and bundle. Start a rails console and see the warning. Then update the Gemfile to gem "rails_db", git: "https://github.com/bpurinton/rails_db.git", branch: "bp-fix-csv-deprecation-warning" and gem update rails_db. Start another console and the errors are gone.
Problem
In Ruby v3.3 the following warning occurs when launching a
rails console
:Solution
Add
csv
gem as a dependency torails_db
. Console issues go away with this change.The fix can be tested by executing
rails new
in a Ruby 3.3.1 environment and than adding therails_db
andbundle
. Start arails console
and see the warning. Then update the Gemfile togem "rails_db", git: "https://github.com/bpurinton/rails_db.git", branch: "bp-fix-csv-deprecation-warning"
andgem update rails_db
. Start another console and the errors are gone.