https://github.com/saneef/reproduce-couldnt-find-template-for-digesting
https://github.com/saneef/reproduce-couldnt-find-template-for-digesting
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/saneef/reproduce-couldnt-find-template-for-digesting
- Owner: saneef
- Created: 2017-06-11T23:43:20.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-07-18T03:39:26.000Z (almost 9 years ago)
- Last Synced: 2025-01-24T18:46:05.033Z (over 1 year ago)
- Language: Ruby
- Size: 23.4 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Reproducing “Couldn't find template for digesting”
# Scaffolding
```bash
$ bundle install
$ rake db:migrate
$ bundle exec rake db:fixtures:load FIXTURES=books
$ bundle exec rails dev:cache # enable cache in development environment
```
# Problem
On a regular page load all caching works. But only on rendering `js.erb` `Couldn't find template for digesting` error occors.
## Steps to reproduce
Run the server following above steps.
```bash
$ bundle exec rails server
```
Click on any of the heart icon. It invokes a ajax patch, for which `/app/views/books/update.js.erb` is rendered. That’s when the error occurs. See this log (look for 🔥).
```bash
Started PATCH "/books/113629430" for 127.0.0.1 at 2017-06-12 05:04:42 +0530
Processing by BooksController#update as JS
Parameters: {"id"=>"113629430"}
Book Load (0.2ms) SELECT "books".* FROM "books" WHERE "books"."id" = ? LIMIT ? [["id", 113629430], ["LIMIT", 1]]
(0.1ms) begin transaction
SQL (0.6ms) UPDATE "books" SET "favorite" = ?, "updated_at" = ? WHERE "books"."id" = ? [["favorite", "t"], ["updated_at", "2017-06-11 23:34:42.976896"], ["id", 113629430]]
(1.5ms) commit transaction
Rendering books/update.js.erb
Couldn't find template for digesting: icons/_icon # <--- 🔥
Rendered icons/_icon.html.erb (2.8ms) [cache hit]
Rendered books/update.js.erb (7.0ms)
Completed 200 OK in 32ms (Views: 18.9ms | ActiveRecord: 2.4ms)
```