SECURITY WARNING: Never run commands you don't understand. Always review code before execution. Use at your own risk.
Ruby New Added 29 September 2026

Ruby: warning: csv was loaded from the standard library

Ruby 3.4 moved csv, base64, bigdecimal and several other libraries out of the default gems and into bundled gems, and Ruby 3.3 warns about each one it sees you require. Under Bundler, a bundled gem is only loadable if it is in the Gemfile, so the warning today becomes cannot load such file after the upgrade. The gem named in the warning may be required by a dependency rather than by your code.

Quick fix

Read the commands before running them. Anything that restarts a service, deletes data or changes permissions should be tried on a non-production system first.

Quick fix
# See every library the warning names
bundle exec ruby -W -e 'require "./config/environment"' 2>&1 | grep 'standard library'

# Add them to the Gemfile
bundle add csv
bundle add base64
bundle add bigdecimal

# If a dependency requires it, upgrading that gem may be the real fix
bundle outdated

# Confirm on the new Ruby
ruby -v
bundle exec ruby -e 'require "csv"; puts CSV::VERSION'

How to diagnose Ruby errors

Ruby errors are dominated by Bundler and gem resolution, native extension compilation (which needs system headers Ruby cannot install for you), and in Rails by the pending-migration and asset-precompilation guards. Those guards are deliberate safety checks, so the fix is to satisfy them rather than to disable them.

If the quick fix above does not resolve it, work through these steps. They apply to this whole class of error, not just to this one message, which is usually what saves the time.

  1. Run bundle install with verbose output and read which gem fails and why. Native extension failures name the missing header in the mkmf log.
  2. Check the mkmf log path the error prints. It contains the actual compiler error, which the Bundler summary truncates.
  3. For Rails migration errors, run rails db:migrate:status to see exactly which migrations the database has recorded.
  4. For asset errors in production, confirm rails assets:precompile ran during deployment and that the manifest is present in public/assets.
  5. Verify the Ruby version matches .ruby-version and the Gemfile. Version managers silently switch, producing gem-not-found errors for gems that are installed elsewhere.

Tools worth reaching for

  • bundle install --verbose
  • rails db:migrate:status
  • gem env
  • rbenv/rvm version check
  • bundle exec

Authoritative references

Primary documentation for this error, worth reading before applying any fix in production.

ruby-lang.org docs.ruby-lang.org

Related Ruby errors

See all 20 Ruby errors →

Browse other categories

Something missing or wrong?

This entry is maintained by hand. If the fix is out of date, incomplete, or you have a better one, email a correction and it will be reviewed.