У меня есть приложение Rails, отправляющее двойные запросы GET. Я обнаружил, что проблема не существует с запросами POST.
В журнале показано, что я тестирую веб-сайт локально, но проблема сохраняется на производстве (Heroku).
Я нашел несколько сообщений об одной и той же проблеме, связанной с турболинками, после чего я приступил к удалению всего, что связано с турболинками, из моего кода. Проблема все еще сохраняется. Я также нашел некоторых людей с похожими проблемами, связанными с пустыми тегами img или url (). Я не нашел ничего подобного. Я также попытался удалить все html-файлы, отображаемые на определенных страницах, чтобы попытаться проверить, не была ли ошибка, в том числе частичная визуализация, безуспешной. Теперь я совершенно невежественен.
Вот журнал, показывающий двойной запрос:
Started GET "/" for 127.0.0.1 at 2019-07-04 18:38:30 -0300
Processing by HomeController#index as HTML
Cart Load (0.5ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" IS NULL LIMIT $1 [["LIMIT", 1]]
Setting Load (0.5ms) SELECT "settings".* FROM "settings" WHERE "settings"."key" = $1 LIMIT $2 [["key", "featured_artist_slug"], ["LIMIT", 1]]
Artist Load (33.8ms) SELECT "users".* FROM "users" left outer join (select user_id from arts group by user_id) as arts on users.id = arts.user_id WHERE (arts.user_id is not null) AND "users"."slug" = $1 LIMIT $2 [["slug", "herisson-artes"], ["LIMIT", 1]]
Rendering home/index.html.erb within layouts/application
(0.5ms) SELECT COUNT(*) AS "size", MAX("banners"."updated_at") AS timestamp FROM "banners" WHERE "banners"."active" = $1 [["active", true]]
Admin::Banner Load (0.5ms) SELECT "banners".* FROM "banners" WHERE "banners"."active" = $1 ORDER BY "banners"."position" ASC [["active", true]]
Rendered home/index.html.erb within layouts/application (18.4ms)
Rendered shared/_google_tag_manager_head.html.erb (0.8ms)
User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT $2 [["id", 56592], ["LIMIT", 1]]
Rendered shared/_google_analytics.html.erb (4.7ms)
Rendered layouts/application/_favicons.html.erb (2.6ms)
Rendered shared/_seo.html.erb (4.1ms)
Rendered layouts/application/_head.html.erb (20.4ms)
Rendered shared/_google_tag_manager_body.html.erb (1.1ms)
Rendered shared/_facebook_js_sdk.html (0.4ms)
(0.9ms) SELECT COUNT(*) AS "size", MAX("coupons"."updated_at") AS timestamp FROM "coupons"
Coupon Load (4.6ms) SELECT "coupons".* FROM "coupons"
Rendered shared/_smartbar.html.erb (219.3ms) [cache hit]
Rendered layouts/application/_navbar.html.erb (7.6ms) [cache hit]
Rendered shared/_alert.html.erb (0.9ms)
Rendered layouts/application/_footer.html.erb (3.4ms) [cache hit]
Art Load (0.6ms) SELECT "arts".* FROM "arts" WHERE "arts"."active" = $1 AND "arts"."user_id" = $2 LIMIT $3 [["active", true], ["user_id", 56592], ["LIMIT", 1]]
(1.2ms) SELECT COUNT(*) FROM "arts" WHERE "arts"."active" = $1 AND "arts"."user_id" = $2 [["active", true], ["user_id", 56592]]
Order Exists (0.5ms) SELECT 1 AS one FROM "orders" WHERE "orders"."deleted_at" IS NULL AND "orders"."user_id" = $1 LIMIT $2 [["user_id", 56592], ["LIMIT", 1]]
Rendered shared/_crisp.html.erb (12.2ms)
Completed 200 OK in 349ms (Views: 291.6ms | ActiveRecord: 44.3ms)
Started GET "/" for 127.0.0.1 at 2019-07-04 18:38:30 -0300
Processing by HomeController#index as HTML
Cart Load (0.5ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" IS NULL LIMIT $1 [["LIMIT", 1]]
Setting Load (0.7ms) SELECT "settings".* FROM "settings" WHERE "settings"."key" = $1 LIMIT $2 [["key", "featured_artist_slug"], ["LIMIT", 1]]
Artist Load (140.1ms) SELECT "users".* FROM "users" left outer join (select user_id from arts group by user_id) as arts on users.id = arts.user_id WHERE (arts.user_id is not null) AND "users"."slug" = $1 LIMIT $2 [["slug", "herisson-artes"], ["LIMIT", 1]]
Rendering home/index.html.erb within layouts/application
(0.6ms) SELECT COUNT(*) AS "size", MAX("banners"."updated_at") AS timestamp FROM "banners" WHERE "banners"."active" = $1 [["active", true]]
Admin::Banner Load (1.2ms) SELECT "banners".* FROM "banners" WHERE "banners"."active" = $1 ORDER BY "banners"."position" ASC [["active", true]]
Rendered home/index.html.erb within layouts/application (26.7ms)
Rendered shared/_google_tag_manager_head.html.erb (0.7ms)
User Load (1.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT $2 [["id", 56592], ["LIMIT", 1]]
Rendered shared/_google_analytics.html.erb (6.8ms)
Rendered layouts/application/_favicons.html.erb (2.8ms)
Rendered shared/_seo.html.erb (5.6ms)
Rendered layouts/application/_head.html.erb (27.5ms)
Rendered shared/_google_tag_manager_body.html.erb (3.1ms)
Rendered shared/_facebook_js_sdk.html (0.7ms)
(1.8ms) SELECT COUNT(*) AS "size", MAX("coupons"."updated_at") AS timestamp FROM "coupons"
Coupon Load (20.7ms) SELECT "coupons".* FROM "coupons"
Rendered shared/_smartbar.html.erb (812.0ms) [cache hit]
Rendered layouts/application/_navbar.html.erb (13.8ms) [cache hit]
Rendered shared/_alert.html.erb (2.1ms)
Rendered layouts/application/_footer.html.erb (7.5ms) [cache hit]
Art Load (1.0ms) SELECT "arts".* FROM "arts" WHERE "arts"."active" = $1 AND "arts"."user_id" = $2 LIMIT $3 [["active", true], ["user_id", 56592], ["LIMIT", 1]]
(1.5ms) SELECT COUNT(*) FROM "arts" WHERE "arts"."active" = $1 AND "arts"."user_id" = $2 [["active", true], ["user_id", 56592]]
Order Exists (1.3ms) SELECT 1 AS one FROM "orders" WHERE "orders"."deleted_at" IS NULL AND "orders"."user_id" = $1 LIMIT $2 [["user_id", 56592], ["LIMIT", 1]]
Rendered shared/_crisp.html.erb (23.1ms)
Completed 200 OK in 1137ms (Views: 948.5ms | ActiveRecord: 170.5ms)
Started GET "/assets/favicons/favicon-359aff8efc45853aea627316f2ab1c7eb0242d855d0e5049152a699ac872092d.ico" for 127.0.0.1 at 2019-07-04 18:38:32 -0300
Started GET "/manifest.json" for 127.0.0.1 at 2019-07-04 18:38:32 -0300
Started GET "/assets/favicons/favicon-359aff8efc45853aea627316f2ab1c7eb0242d855d0e5049152a699ac872092d.ico" for 127.0.0.1 at 2019-07-04 18:38:32 -0300
Started GET "/manifest.json" for 127.0.0.1 at 2019-07-04 18:38:32 -0300
Started GET "/serviceworker.js" for 127.0.0.1 at 2019-07-04 18:38:34 -0300
Любые советы приветствуются. Заранее спасибо.