mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 05:50:14 +08:00
DEV: Compatibility with TruffleRuby (#16641)
This commit is contained in:
parent
80d2888222
commit
8442a07c13
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env ruby
|
||||
# frozen_string_literal: true
|
||||
|
||||
if !ENV["RAILS_ENV"] && (ARGV[0] == "s" || ARGV[0] == "server")
|
||||
if !ENV["RAILS_ENV"] && (ARGV[0] == "s" || ARGV[0] == "server") && Process.respond_to?(:fork)
|
||||
ENV["UNICORN_PORT"] ||= "3000"
|
||||
|
||||
if ARGV[1] == "-p" && (port = ARGV[2].to_i) > 0
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# If Mini Profiler is included via gem
|
||||
if Rails.configuration.respond_to?(:load_mini_profiler) && Rails.configuration.load_mini_profiler
|
||||
if Rails.configuration.respond_to?(:load_mini_profiler) && Rails.configuration.load_mini_profiler && RUBY_ENGINE == "ruby"
|
||||
require 'rack-mini-profiler'
|
||||
require 'stackprof'
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ if ENV['COVERAGE']
|
|||
end
|
||||
|
||||
require 'rubygems'
|
||||
require 'rbtrace'
|
||||
require 'rbtrace' if RUBY_ENGINE == "ruby"
|
||||
require 'pry'
|
||||
require 'pry-byebug'
|
||||
require 'pry-rails'
|
||||
|
|
Loading…
Reference in New Issue
Block a user