# File lib/phusion_passenger/platform_info/ruby.rb, line 231
        def self.rvm_paths
                if in_rvm?
                        result = []
                        [ENV['rvm_path'], "~/.rvm", "/usr/local/rvm"].each do |path|
                                next if path.nil?
                                path = File.expand_path(path)
                                rubies_path = File.join(path, 'rubies')
                                wrappers_path = File.join(path, 'wrappers')
                                gems_path = File.join(path, 'gems')
                                if File.directory?(path) && (File.directory?(rubies_path) ||
                                   File.directory?(wrappers_path) || File.directory?(gems_path))
                                        result << path
                                end
                        end
                        if result.empty?
                                # Failure to locate the RVM path is probably caused by the
                                # user customizing $rvm_path. Older RVM versions don't
                                # export $rvm_path, making us unable to detect its value.
                                STDERR.puts "Unable to locate the RVM path. Your RVM installation " +
                                        "is probably too old. Please update it with " +
                                        "'rvm get head && rvm reload && rvm repair all'."
                                exit 1
                        else
                                return result
                        end
                else
                        return nil
                end
        end