rails disable caching in devleopment

To disable caching in development in Ruby on Rails, you can follow these steps:

  1. Open the config/environments/development.rb file in your Rails application.

  2. Look for the line that says config.cache_classes = true and change it to config.cache_classes = false. This step disables class caching in the development environment.

  3. Next, find the line that says config.action_controller.perform_caching = true and change it to config.action_controller.perform_caching = false. This step disables caching for the ActionController in the development environment.

  4. Additionally, you can also disable the asset pipeline caching by finding the line that says config.assets.digest = true and changing it to config.assets.digest = false. This step stops the generation of digested asset filenames, allowing you to see immediate changes to your assets during development.

  5. Save the file and restart your Rails server for the changes to take effect.

By following these steps, you will disable caching in the development environment of your Ruby on Rails application. This can be useful during development as it allows you to see immediate changes without the need to clear the cache or restart the server each time.