Skip to content

A platform for community discussion. Free, open, simple.

DEV: Bump ruby version requirement to 3.3.0 (#31538)

Martin Brennan76e58a55edb1
diff --git a/.ruby-version.sample b/.ruby-version.sample
deleted file mode 100644
index e4604e3afd0..00000000000
--- a/.ruby-version.sample
+++ /dev/null
@@ -1 +0,0 @@
-3.2.1
diff --git a/Gemfile b/Gemfile
index fcf64e7a354..bb8eb077fe9 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,5 +1,7 @@
# frozen_string_literal: true
+ruby "~> 3.3.0"
+
source "https://rubygems.org"
# if there is a super emergency and rubygems is playing up, try
#source 'http://production.cf.rubygems.org'
diff --git a/README.md b/README.md
index d5623e3cfed..d791234f34b 100644
--- a/README.md
+++ b/README.md
@@ -44,7 +44,7 @@ To get your environment set up, follow one of the setup guides:
- [Ubuntu/Debian](https://meta.discourse.org/t/14727)
- [Windows](https://meta.discourse.org/t/75149)
-Before you get started, ensure you have the following minimum versions: [Ruby 3.2+](https://www.ruby-lang.org/en/downloads/), [PostgreSQL 13](https://www.postgresql.org/download/), [Redis 7](https://redis.io/download).
+Before you get started, ensure you have the following minimum versions: [Ruby 3.3+](https://www.ruby-lang.org/en/downloads/), [PostgreSQL 13](https://www.postgresql.org/download/), [Redis 7](https://redis.io/download).
For more information, check out [the Developer Documentation](https://meta.discourse.org/c/documentation/developer-guides/56).
diff --git a/config/application.rb b/config/application.rb
index dfc49e66f5d..5809f59cb05 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -1,10 +1,5 @@
# frozen_string_literal: true
-if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("3.2.0")
- STDERR.puts "Discourse requires Ruby 3.2 or above"
- exit 1
-end
-
require File.expand_path("../boot", __FILE__)
require "active_record/railtie"
require "action_controller/railtie"
@@ -12,13 +7,6 @@ require "action_view/railtie"
require "action_mailer/railtie"
require "sprockets/railtie"
-if !Rails.env.production?
- recommended = File.read(".ruby-version.sample").strip
- if Gem::Version.new(RUBY_VERSION) < Gem::Version.new(recommended)
- STDERR.puts "[Warning] Discourse recommends developing using Ruby v#{recommended} or above. You are using v#{RUBY_VERSION}."
- end
-end
-
# Plugin related stuff
require_relative "../lib/plugin"
require_relative "../lib/discourse_event"