I'm working in a new Rails engine and I need to restart it while testing. Of I try Dummy::Application.initialize!
i开发者_如何学运维t do not work because the application was already initialized, so Rails returned the same instance.
I need to do so my engine after_initialize
block runs again>
I do not believe that Rails::Application has any (at least publicly accessible) method for restarting the stack. Your best way (and what I do) is just exit the server process (Control + C) and rails s
the server back up.
If that is not what you are talking about, please be more specific on the error and situation you are in.
ref: http://railsapi.com/doc/rails-v3.0.7/classes/Rails/Application.html
精彩评论