Please note that usage of gem in Rails 8.0.0 is possible but with workaround:
Gemfile
gem "pry-rails", require: false
config/initializers/pry.rb
if %w[development test].include?(Rails.env)
# NOTE: this got deprecated in Rails 8.0 but is still used in pry-rails which is barely maintained gem.
require "rails/console/app"
require "pry-rails"
end
lib/rails/console/app.rb
(straight copy from rails 7.2 with extension):
Rails.deprecator.warn(<<~MSG, caller_locations(0..1))
`rails/console/app` has been removed in Rails 8.0.
Please require `rails/console/methods` instead.
NOTE: this is XXX project implant to support deprecated gem.
MSG
require "rails/console/methods"