Generate reference to the database in the cache template for all envi… #279
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix #278
The problem:
When we run the bundle exec rails solid_cache:install, it generated a cache.yml file which contains the reference to the cache database only for production mode.
(Personal Note: As I was testing the cache in development, I was expecting that the generated file would be perfect for all environments. Then I would turn on the caching for the development environment in the development.rb by config.cache_store = :solid_cache_store if I wanted to. But I was surprised. My eyes just jumped over the missing
database:...
part in the cache.yml file, so I spent about 20 minutes figuring out what was wrong. If we multiply that 20 minutes by 10000 devs who are struggling, then that is a lot of lost hours ~3300)The solution:
Generate a ready-to-use cache file.
This decision is up to you (37signal) guys :) I just want to be helpful.
Some other guys were also struggling with this issue:
https://www.reddit.com/r/rails/comments/1gws1fp/help_needed_with_solid_cache/