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
339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 |
# File 'lib/oop_rails_server/rails_server.rb', line 339 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 = @server_logfile = server_logfile @last_lines = last_lines end |
Instance Attribute Details
#last_lines ⇒ Object (readonly)
Returns the value of attribute last_lines.
337 338 339 |
# File 'lib/oop_rails_server/rails_server.rb', line 337 def last_lines @last_lines end |
#server_logfile ⇒ Object (readonly)
Returns the value of attribute server_logfile.
337 338 339 |
# File 'lib/oop_rails_server/rails_server.rb', line 337 def server_logfile @server_logfile end |
#timeout ⇒ Object (readonly)
Returns the value of attribute timeout.
337 338 339 |
# File 'lib/oop_rails_server/rails_server.rb', line 337 def timeout @timeout end |
#verify_exception_or_message ⇒ Object (readonly)
Returns the value of attribute verify_exception_or_message.
337 338 339 |
# File 'lib/oop_rails_server/rails_server.rb', line 337 def end |