class PhusionPassenger::NativeSupportLoader

Public Class Methods

supported?() click to toggle source
# File lib/phusion_passenger/native_support.rb, line 27
def self.supported?
        return !defined?(RUBY_ENGINE) || RUBY_ENGINE == "ruby" || RUBY_ENGINE == "rbx"
end

Public Instance Methods

start() click to toggle source
# File lib/phusion_passenger/native_support.rb, line 42
def start
        if ENV['PASSENGER_USE_RUBY_NATIVE_SUPPORT'] == '0'
                STDERR.puts " --> Continuing without #{library_name}."
                STDERR.puts "     Because PASSENGER_USE_RUBY_NATIVE_SUPPORT is set to 0."
                return false
        elsif try_load
                return true
        elsif compile_and_load || download_binary_and_load
                STDERR.puts " --> #{library_name} successfully loaded."
                return true
        else
                STDERR.puts " --> Continuing without #{library_name}."
                return false
        end
end
try_load() click to toggle source
# File lib/phusion_passenger/native_support.rb, line 31
def try_load
        if defined?(NativeSupport)
                return true
        else
                load_from_native_support_output_dir ||
                load_from_buildout_dir ||
                load_from_load_path ||
                load_from_home_dir
        end
end