简体   繁体   中英

What is dynamically generated in a rails application?

What I'm trying to determine is what can be changed on-the-fly in a Rails application w/o restarting the web server.

My assumption is that anything that requires bundler needs restarting and any regular ascii based files (html/css/js) or images can be modified on the fly, but how about:

  • /app/controllers/
  • /app/models/
  • /app/views/
  • /config/database.yml

Do any changes to the ruby (*.erb, *.rb) files require a recompile and the web server to be restarted?

There is no strict answer to that question.

In general, Rails tries to reload everything it can without sacrificing development speed.

That is basically everything in app and what you define in config.autoload_paths .

You can circumvent some restrictions yourself, have a look about how to enable middleware code reloading: Reloading rails middleware without restarting the server in development

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM