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.
322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 |
# File 'lib/oop_rails_server/rails_server.rb', line 322 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.
320 321 322 |
# File 'lib/oop_rails_server/rails_server.rb', line 320 def last_lines @last_lines end |
#server_logfile ⇒ Object (readonly)
Returns the value of attribute server_logfile.
320 321 322 |
# File 'lib/oop_rails_server/rails_server.rb', line 320 def server_logfile @server_logfile end |
#timeout ⇒ Object (readonly)
Returns the value of attribute timeout.
320 321 322 |
# File 'lib/oop_rails_server/rails_server.rb', line 320 def timeout @timeout end |
#verify_exception_or_message ⇒ Object (readonly)
Returns the value of attribute verify_exception_or_message.
320 321 322 |
# File 'lib/oop_rails_server/rails_server.rb', line 320 def end |