How can I get Rails 3.2 to restart the installed rack application on request in development mode?

How can I get Rails 3.2 to restart the installed rack application on request in development mode?

I installed grape this way

mount API2, :at => "/api2" 

However, the rails do not reflect changes in the application without restarting the web server.

+4
source share
1 answer

Contact: fooobar.com/questions/98508 / ...

 # Reload Grape in development mode api_reloader = ActiveSupport::FileUpdateChecker.new(Dir["path/to/you/api/dir/**/*"], true) do Rails.application.reload_routes! # or do something better here end ActionDispatch::Callbacks.to_prepare do api_reloader.execute_if_updated end 
+5
source

Source: https://habr.com/ru/post/1394141/


All Articles