diff --git a/bin/rails b/bin/rails index 595d7184197..eedb72185b1 100755 --- a/bin/rails +++ b/bin/rails @@ -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 diff --git a/config/initializers/006-mini_profiler.rb b/config/initializers/006-mini_profiler.rb index 2f80ebffc16..297ccdfbdee 100644 --- a/config/initializers/006-mini_profiler.rb +++ b/config/initializers/006-mini_profiler.rb @@ -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' diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 2c408aa03cd..5f4fba08c82 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -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'