class OopRailsServer::RailsServer::FailedStartupError

Attributes

last_lines[R]
server_logfile[R]
timeout[R]
verify_exception_or_message[R]

Public Class Methods

new(timeout, verify_exception_or_message, server_logfile, last_lines) click to toggle source
Calls superclass method
# File lib/oop_rails_server/rails_server.rb, line 339
      def initialize(timeout, verify_exception_or_message, server_logfile, last_lines)
        message = %{The out-of-process Rails server failed to start up properly and start responding to requests,
even after #{timeout.round} seconds. This typically means you've added code that prevents it from
even starting up -- most likely, a syntax error in a class or other error that stops it
dead in its tracks. (oop_rails_server starts up Rails servers in the production environment
by default, and, in production, Rails eagerly loads all classes at startup time.)}

        if server_logfile
          message << %{

Any errors will be located in the stdout/stderr of the Rails process, which is at:
  '#{server_logfile}'}
        end

        if last_lines
          message << %{

The last #{last_lines.length} lines of this log are:

#{last_lines.join("\n")}}
        end

        super(message)

        @timeout = timeout
        @verify_exception_or_message = verify_exception_or_message
        @server_logfile = server_logfile
        @last_lines = last_lines
      end