开发者

Restart a dummy application when testing rails engines?

开发者 https://www.devze.com 2023-03-07 18:24 出处:网络
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 R

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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号