Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails 3 development environment keeps caching, even without caching on?

i have a rails 3 app in dev mode that won't load any changes i make when its running webrick. i triple checked the settings for my development.rb and made sure i am running in development mode.

config.cache_classes = false
config.action_controller.perform_caching = false

i also checked my tmp directory to make sure the cache folder is empty - i have yet to do any caching on the site and have never turned on caching. im guessing its a loading problem with the files.

also i was running on webrick then installed mongrel and the problem still persists.

im guessing ive run into a config problem, bc i dont see anyone else posting such a prob. anything else im missing?

EDIT: it looks like my view helpers aren't auto loadable - aren't helpers by default supposed to be reloadable in rails 3?

like image 904
oranges Avatar asked Apr 13 '11 08:04

oranges


People also ask

Where does Rails store cache?

ActiveSupport::Cache::MemCacheStore uses Danga's memcached server to provide a centralized cache for your application. Rails uses the bundled dalli gem by default. This is currently the most popular cache store for production websites.

Does Rails cache use Redis?

Rails 5.2 introduced built-in Redis cache store, which allows you to store cache entries in Redis.

Which of the following caching techniques is are available in Rails?

This is an introduction to three types of caching techniques: page, action and fragment caching. Rails provides by default fragment caching. In order to use page and action caching, you will need to add actionpack-page_caching and actionpack-action_caching to your Gemfile.

What does Rails cache clear do?

cache. clear will clear your app cache. In that case rake tmp:cache:clear will just try to remove files from "#{Rails.


2 Answers

I've had a similar experience, but I don't believe it was with an actual helper class, it was with anything I wrote under the lib/ directory. If you've had to use a require 'some_class' statement, then you should switch it to:

require_dependency 'some_class'

Worked like a charm for me.

like image 81
shakerlxxv Avatar answered Oct 10 '22 16:10

shakerlxxv


I had the same problem and here is the simple solution.
In your config/environments/development.rb set following settings:

config.action_controller.perform_caching = false
config.perform_caching = false
config.cache_store = :null_store
like image 25
Qaisar Nadeem Avatar answered Oct 10 '22 17:10

Qaisar Nadeem