Skip to content

Commit

Permalink
Bump minimum Ruby version to 2.3.
Browse files Browse the repository at this point in the history
  • Loading branch information
tgxworld committed Jun 10, 2016
1 parent a496574 commit 09b92dd
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 26 deletions.
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ matrix:
fast_finish: true

rvm:
- 2.0.0
- 2.1
- 2.2
- 2.3.1

services:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Browse [lots more notable Discourse instances](http://www.discourse.org/faq/cust

2. If you're familiar with how Rails works and are comfortable setting up your own environment, use our [**Discourse Advanced Developer Guide**](docs/DEVELOPER-ADVANCED.md).

Before you get started, ensure you have the following minimum versions: [Ruby 2.0.0+](http://www.ruby-lang.org/en/downloads/), [PostgreSQL 9.3+](http://www.postgresql.org/download/), [Redis 2.6+](http://redis.io/download). If you're having trouble, please see our [**TROUBLESHOOTING GUIDE**](docs/TROUBLESHOOTING.md) first!
Before you get started, ensure you have the following minimum versions: [Ruby 2.3+](http://www.ruby-lang.org/en/downloads/), [PostgreSQL 9.3+](http://www.postgresql.org/download/), [Redis 2.6+](http://redis.io/download). If you're having trouble, please see our [**TROUBLESHOOTING GUIDE**](docs/TROUBLESHOOTING.md) first!

## Setting up Discourse

Expand Down
6 changes: 1 addition & 5 deletions app/models/admin_dashboard_data.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def self.reset_problem_checks
'dashboard.poll_pop3_auth_error'
]

add_problem_check :rails_env_check, :ruby_version_check, :host_names_check,
add_problem_check :rails_env_check, :host_names_check,
:ram_check, :google_oauth2_config_check,
:facebook_config_check, :twitter_config_check,
:github_config_check, :s3_config_check, :image_magick_check,
Expand Down Expand Up @@ -249,10 +249,6 @@ def notification_email_check
I18n.t('dashboard.notification_email_warning') if !SiteSetting.notification_email.present? || SiteSetting.notification_email == SiteSetting.defaults[:notification_email]
end

def ruby_version_check
I18n.t('dashboard.ruby_version_warning') if RUBY_VERSION == '2.0.0' and RUBY_PATCHLEVEL < 247
end

def subfolder_ends_in_slash_check
I18n.t('dashboard.subfolder_ends_in_slash') if Discourse.base_uri =~ /\/$/
end
Expand Down
6 changes: 1 addition & 5 deletions config/boot.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
if ENV['DISCOURSE_DUMP_HEAP'] == "1"
require 'objspace'
begin
ObjectSpace.trace_object_allocations_start
rescue NoMethodError
puts "Heap dumps not available for Ruby #{RUBY_VERSION} (> 2.1 required)"
end
ObjectSpace.trace_object_allocations_start
end

require 'rubygems'
Expand Down
7 changes: 1 addition & 6 deletions config/initializers/006-mini_profiler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@
if Rails.configuration.respond_to?(:load_mini_profiler) && Rails.configuration.load_mini_profiler
require 'rack-mini-profiler'
require 'flamegraph'

begin
require 'memory_profiler' if RUBY_VERSION >= "2.1.0"
rescue => e
STDERR.put "#{e} failed to require mini profiler"
end
require 'memory_profiler'

# initialization is skipped so trigger it
Rack::MiniProfilerRails.initialize!(Rails.application)
Expand Down
5 changes: 0 additions & 5 deletions config/initializers/099-unicorn.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,4 @@
ObjectSpace.each_object(Unicorn::HttpServer) do |s|
s.extend(Scheduler::Defer::Unicorn)
end

if ENV['UNICORN_ENABLE_OOBGC'] == '1' && RUBY_VERSION < "2.2.0"
require 'middleware/unicorn_oobgc'
Middleware::UnicornOobgc.init
end
end
1 change: 0 additions & 1 deletion config/locales/server.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,6 @@ en:

dashboard:
rails_env_warning: "Your server is running in %{env} mode."
ruby_version_warning: "You are running a version of Ruby 2.0.0 that is known to have problems. Upgrade to patch level 247 or later."
host_names_warning: "Your config/database.yml file is using the default localhost hostname. Update it to use your site's hostname."
gc_warning: 'Your server is using default ruby garbage collection parameters, which will not give you the best performance. Read this topic on performance tuning: <a href="http://meta.discourse.org/t/tuning-ruby-and-rails-for-discourse/4126" target="_blank">Tuning Ruby and Rails for Discourse</a>.'
sidekiq_warning: 'Sidekiq is not running. Many tasks, like sending emails, are executed asynchronously by sidekiq. Please ensure at least one sidekiq process is running. <a href="https://github.com/mperham/sidekiq" target="_blank">Learn about Sidekiq here</a>.'
Expand Down

0 comments on commit 09b92dd

Please sign in to comment.