Exception: OopRailsServer::RailsServer::FailedStartupError
- Inherits:
-
StandardError
- Object
- StandardError
- OopRailsServer::RailsServer::FailedStartupError
- Defined in:
- lib/oop_rails_server/rails_server.rb
Instance Attribute Summary collapse
-
#last_lines ⇒ Object
readonly
Returns the value of attribute last_lines.
-
#server_logfile ⇒ Object
readonly
Returns the value of attribute server_logfile.
-
#timeout ⇒ Object
readonly
Returns the value of attribute timeout.
-
#verify_exception_or_message ⇒ Object
readonly
Returns the value of attribute verify_exception_or_message.
Instance Method Summary collapse
-
#initialize(timeout, verify_exception_or_message, server_logfile, last_lines) ⇒ FailedStartupError
constructor
A new instance of FailedStartupError.
Constructor Details
#initialize(timeout, verify_exception_or_message, server_logfile, last_lines) ⇒ FailedStartupError
Returns a new instance of FailedStartupError.
351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 |
# File 'lib/oop_rails_server/rails_server.rb', line 351 def initialize(timeout, , server_logfile, last_lines) = %{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 << %{ Any errors will be located in the stdout/stderr of the Rails process, which is at: '#{server_logfile}'} end if last_lines << %{ The last #{last_lines.length} lines of this log are: #{last_lines.join("\n")}} end super() @timeout = timeout @verify_exception_or_message = @server_logfile = server_logfile @last_lines = last_lines end |
Instance Attribute Details
#last_lines ⇒ Object (readonly)
Returns the value of attribute last_lines.
349 350 351 |
# File 'lib/oop_rails_server/rails_server.rb', line 349 def last_lines @last_lines end |
#server_logfile ⇒ Object (readonly)
Returns the value of attribute server_logfile.
349 350 351 |
# File 'lib/oop_rails_server/rails_server.rb', line 349 def server_logfile @server_logfile end |
#timeout ⇒ Object (readonly)
Returns the value of attribute timeout.
349 350 351 |
# File 'lib/oop_rails_server/rails_server.rb', line 349 def timeout @timeout end |
#verify_exception_or_message ⇒ Object (readonly)
Returns the value of attribute verify_exception_or_message.
349 350 351 |
# File 'lib/oop_rails_server/rails_server.rb', line 349 def @verify_exception_or_message end |