diff --git a/guides/source/active_record_postgresql.md b/guides/source/active_record_postgresql.md index eb7088d79ee59..ea347f291b037 100644 --- a/guides/source/active_record_postgresql.md +++ b/guides/source/active_record_postgresql.md @@ -170,7 +170,7 @@ irb> Event.where("payload->>'kind' = ?", "user_renamed") * [type definition](https://www.postgresql.org/docs/current/static/rangetypes.html) * [functions and operators](https://www.postgresql.org/docs/current/static/functions-range.html) -This type is mapped to Ruby [`Range`](https://ruby-doc.org/core-2.7.0/Range.html) objects. +This type is mapped to Ruby [`Range`](https://ruby-doc.org/core-3.1.0/Range.html) objects. ```ruby # db/migrate/20130923065404_create_events.rb @@ -449,7 +449,7 @@ irb> user.save! * [type definition](https://www.postgresql.org/docs/current/static/datatype-net-types.html) The types `inet` and `cidr` are mapped to Ruby -[`IPAddr`](https://ruby-doc.org/stdlib-2.7.0/libdoc/ipaddr/rdoc/IPAddr.html) +[`IPAddr`](https://ruby-doc.org/stdlib-3.1.0/libdoc/ipaddr/rdoc/IPAddr.html) objects. The `macaddr` type is mapped to normal text. ```ruby diff --git a/guides/source/command_line.md b/guides/source/command_line.md index 58cd2edda5533..e3c936f1c09a6 100644 --- a/guides/source/command_line.md +++ b/guides/source/command_line.md @@ -509,8 +509,8 @@ $ bin/rails destroy model Oops $ bin/rails about About your application's environment Rails version 7.2.0 -Ruby version 2.7.0 (x86_64-linux) -RubyGems version 2.7.3 +Ruby version 3.1.0 (x86_64-linux) +RubyGems version 3.3.7 Rack version 3.0.8 JavaScript Runtime Node.js (V8) Middleware: ActionDispatch::HostAuthorization, Rack::Sendfile, ActionDispatch::Static, ActionDispatch::Executor, ActionDispatch::ServerTiming, ActiveSupport::Cache::Strategy::LocalCache::Middleware, Rack::Runtime, Rack::MethodOverride, ActionDispatch::RequestId, ActionDispatch::RemoteIp, Sprockets::Rails::QuietAssets, Rails::Rack::Logger, ActionDispatch::ShowExceptions, WebConsole::Middleware, ActionDispatch::DebugExceptions, ActionDispatch::ActionableExceptions, ActionDispatch::Reloader, ActionDispatch::Callbacks, ActiveRecord::Migration::CheckPending, ActionDispatch::Cookies, ActionDispatch::Session::CookieStore, ActionDispatch::Flash, ActionDispatch::ContentSecurityPolicy::Middleware, ActionDispatch::PermissionsPolicy::Middleware, Rack::Head, Rack::ConditionalGet, Rack::ETag, Rack::TempfileReaper diff --git a/guides/source/getting_started.md b/guides/source/getting_started.md index 918d3d08972d7..f0cb34a6efc2d 100644 --- a/guides/source/getting_started.md +++ b/guides/source/getting_started.md @@ -93,10 +93,10 @@ current version of Ruby installed: ```bash $ ruby --version -ruby 2.7.0 +ruby 3.1.0 ``` -Rails requires Ruby version 2.7.0 or later. It is preferred to use the latest Ruby version. +Rails requires Ruby version 3.1.0 or later. It is preferred to use the latest Ruby version. If the version number returned is less than that number (such as 2.3.7, or 1.8.7), you'll need to install a fresh copy of Ruby. diff --git a/guides/source/upgrading_ruby_on_rails.md b/guides/source/upgrading_ruby_on_rails.md index 0fe8b1e2ab22c..7896a86d311de 100644 --- a/guides/source/upgrading_ruby_on_rails.md +++ b/guides/source/upgrading_ruby_on_rails.md @@ -20,7 +20,8 @@ The best way to be sure that your application still works after upgrading is to Rails generally stays close to the latest released Ruby version when it's released: -* Rails 7 requires Ruby 2.7.0 or newer. +* Rails 7.2 requires Ruby 3.1.0 or newer. +* Rails 7.0 and 7.1 requires Ruby 2.7.0 or newer. * Rails 6 requires Ruby 2.5.0 or newer. * Rails 5 requires Ruby 2.2.2 or newer. diff --git a/railties/lib/rails.rb b/railties/lib/rails.rb index f4fa213bfece1..3d17f034895fb 100644 --- a/railties/lib/rails.rb +++ b/railties/lib/rails.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require "rails/ruby_version_check" - require "pathname" require "active_support" diff --git a/railties/lib/rails/cli.rb b/railties/lib/rails/cli.rb index a56da65b0657d..7bbfcf748968a 100644 --- a/railties/lib/rails/cli.rb +++ b/railties/lib/rails/cli.rb @@ -6,7 +6,6 @@ # the rest of this script is not run. Rails::AppLoader.exec_app -require "rails/ruby_version_check" Signal.trap("INT") { puts; exit(1) } require "rails/command" diff --git a/railties/lib/rails/ruby_version_check.rb b/railties/lib/rails/ruby_version_check.rb deleted file mode 100644 index 0cf64d154126a..0000000000000 --- a/railties/lib/rails/ruby_version_check.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -# :stopdoc: - -if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.7.0") && RUBY_ENGINE == "ruby" - desc = defined?(RUBY_DESCRIPTION) ? RUBY_DESCRIPTION : "ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE})" - abort <<-end_message - - Rails 7 requires Ruby 2.7.0 or newer. - - You're running - #{desc} - - Please upgrade to Ruby 2.7.0 or newer to continue. - - end_message -end