upgrade Rails from 6.1 to 7.0

  1.  检查Gems兼容问题
  2. 通过Rails app:update ,更新Gemfile里面的rails版本后运行.帮你创建一些新配置文件,已经旧文件里的一些替换等.https://guides.rubyonrails.org/upgrading_ruby_on_rails.html#the-update-task
  3. 看官方文档, 看看做了哪些升级 https://edgeguides.rubyonrails.org/upgrading_ruby_on_rails.html#upgrading-from-rails-6-1-to-rails-7-0
  4. zeitwerk mode,  config.autoloader= 被删除
  5. application
    1. remove config indbconsole
    2. remvove return_only_media_type_on_content_type in ActionDispatch::Response
    3. remove hosts_response_app in Rails.config.action_dispatch
    4. #host! in ActionDispatch::SystemTestCase
    5. path to fixture_file_upload  relative to fixture_path
    6. raise_onmissing_translations in Rails.config.action_view
    7. ActionView::Helpers::UrlHelper#button_to changed
    8. Remove deprecated ActionMailer::DeliveryJob and ActionMailer::Parameterized::DeliveryJob in favor of ActionMailer::MailDeliveryJob
    9. The email_address_with_name 方法返回address 如果name是blank
    10. open_time and read_timeout was configured to 5 in the SMTP Settings.
    11. remove deprecated database kwarg from connected_to
    12. remove allow_unsafe_raw_sql in ActioveRecord::Base
    13. remove deprecated option :spec_name in configs_for.
    14. Remove deprecated support to YAML load ActiveRecord::Base instance in the Rails 4.2 and 4.1 formats
    15. Remove deprecation warning when :interval column is used in PostgreSQL database; Now interval columns will return ActiveSupport::Duration objects insetad of strings.
    16. remove deprecated rake tasks: db:schema:load_if_ruby/ db:structure:dump/db:structure:load/load_if_sql/dump:#{name}/load:#{name}/db:test:load_structure/db:test:load_structure:#{name}
    17. 事务回滚问题
    18. 同一个column的条件合并,取最新的那个
    19. Add the ActiveStorage::BLob.compose 去concatenate multiple blobs. blob: binary large object
    20. 自定义 metadata on blobs persisted to remote storage.
    21. 支持direct upload to multiple services
    22. @user.hightlights = [""]   @user.heightlights #=>[]
    23. invalid default content types: image/jpg, image/pjpeg,image/bmp,text/javascript
    24. remove deprecated replace_on_assign_to_many in config.active_storeage.
    25. remove deprecated build_after_upload in favor of create_after_up-load!
    26. remove deprecated service_url in favor of url.
    27. remove deprecated  enumeration of ActiveModel::Errors instances as a Hash.
    28. Remove deprecated to_h, slice!, value, keys and to_xml in ActiveModel:Errors.
    29. Remove deprecated support concat errors to ActiveModel::Errors#messages.
    30. Remove deprecated support to clear errors from ActiveModel::Errors#messages.
    31. Remove deprecated suport to delete errors from AcitiveModel::Errors#messages.
    32. Remove deprecated support to use []= in ActiveModel::Errors#messages.
    33. remove use_sha_digests in config.active_support
    34. remove URI.parser/  include? in Range/ default_normalization_form in ActiveSupport::Multibyte::Unicode/ []= in ActiveModel::Errror#messages
    35. remove :return_false_on_aborted_enqueue option/ ActiveRecord::Base.connection_config./ActiveRecord::Base.arel_attribute/ ActiveRecord::Base.configurations.default_hash./ActiveRecord::Base.configurations.to_h/ActiveRecord::Result#map! and ActiveRecord::Result#collect!/ ActiveRecord::Base#remove_connection.
    36. Make the Action Text + Trix JavaScript and CSS available through the asset pipeline
    37. OpenSSL constants are now used for Digest computations.
    38. Allow passing a custom direct_upload_url aor blob_url_template to rich_text_area_tag
    39. Add attachments to the list of permitted parameters for inboudn email conductor
    40. Add ability to config ActiveStorage service for storing email raw source.
    41. Add ability to incinerate an inbound message through the conductor interface.

阅读量: 74