Use ActiveRecord::Base.connection.active? and rescue any exception in connect_to_db?
( cherry picked from commit 55ab92c0 upstream ) This ensures that rake tasks that don't need a DB connection can be run without one.
Showing
Please register or sign in to comment