ruby-on-rails - 我可以在我的 rails 应用程序中将 bootstrap 3 更改为 bootstrap 4 吗?
问题描述
我在我的项目中使用了 bootstrap 3(bootstrap-sass gem)。但我想将其更改为第四个引导程序(gem 'bootstrap')。我将线路更改gem 'bootstrap-sass', '~> 3.4.1'
为gem 'bootstrap', '~> 4.4.1'
并执行bundle install
。当我打开网站时,我得到一个错误We're sorry, but something went wrong.
。引导代码 3 可以在引导 4 上正常工作吗?
application.html.erb
我将and中的所有代码更改index.html.erb
为简单<p>Hello</p>
但我仍然得到同样的错误。
日志:
Processing by PostsController#index as HTML
Rendering posts/index.html.erb within layouts/application
[1m[36mPost Load (0.6ms)[0m [1m[34mSELECT "posts".* FROM "posts" ORDER BY created_at DESC[0m
↳ app/views/posts/index.html.erb:4
[1m[36mAuthor Load (0.7ms)[0m [1m[34mSELECT "authors".* FROM "authors" WHERE "authors"."id" = $1 LIMIT $2[0m [["id", 1], ["LIMIT", 1]]
↳ app/views/posts/_post.html.erb:7
[1m[35m (1.4ms)[0m [1m[34mSELECT COUNT(DISTINCT "impressions"."ip_address") FROM "impressions" WHERE "impressions"."impressionable_id" = $1 AND "impressions"."impressionable_type" = $2[0m [["impressionable_id", 42], ["impressionable_type", "Post"]]
↳ app/views/posts/_post.html.erb:8
[1m[35m (0.8ms)[0m [1m[34mSELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = $1[0m [["post_id", 42]]
↳ app/views/posts/_post.html.erb:8
[1m[36mActionText::RichText Load (0.4ms)[0m [1m[34mSELECT "action_text_rich_texts".* FROM "action_text_rich_texts" WHERE "action_text_rich_texts"."record_id" = $1 AND "action_text_rich_texts"."record_type" = $2 AND "action_text_rich_texts"."name" = $3 LIMIT $4[0m [["record_id", 42], ["record_type", "Post"], ["name", "content"], ["LIMIT", 1]]
↳ app/views/posts/_post.html.erb:21
Rendered /home/vyacheslav/.rvm/gems/ruby-2.6.3/gems/actiontext-6.0.1/app/views/action_text/content/_layout.html.erb (Duration: 1.2ms | Allocations: 362)
[1m[36mActiveStorage::Attachment Load (0.4ms)[0m [1m[34mSELECT "active_storage_attachments".* FROM "active_storage_attachments" WHERE "active_storage_attachments"."record_id" = $1 AND "active_storage_attachments"."record_type" = $2 AND "active_storage_attachments"."name" = $3 LIMIT $4[0m [["record_id", 42], ["record_type", "Post"], ["name", "picture"], ["LIMIT", 1]]
↳ app/views/posts/_post.html.erb:22
[1m[36mCACHE Author Load (0.0ms)[0m [1m[34mSELECT "authors".* FROM "authors" WHERE "authors"."id" = $1 LIMIT $2[0m [["id", 1], ["LIMIT", 1]]
↳ app/views/posts/_post.html.erb:7
[1m[35m (0.6ms)[0m [1m[34mSELECT COUNT(DISTINCT "impressions"."ip_address") FROM "impressions" WHERE "impressions"."impressionable_id" = $1 AND "impressions"."impressionable_type" = $2[0m [["impressionable_id", 41], ["impressionable_type", "Post"]]
↳ app/views/posts/_post.html.erb:8
[1m[35m (0.5ms)[0m [1m[34mSELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = $1[0m [["post_id", 41]]
↳ app/views/posts/_post.html.erb:8
[1m[36mActionText::RichText Load (0.3ms)[0m [1m[34mSELECT "action_text_rich_texts".* FROM "action_text_rich_texts" WHERE "action_text_rich_texts"."record_id" = $1 AND "action_text_rich_texts"."record_type" = $2 AND "action_text_rich_texts"."name" = $3 LIMIT $4[0m [["record_id", 41], ["record_type", "Post"], ["name", "content"], ["LIMIT", 1]]
↳ app/views/posts/_post.html.erb:21
Rendered /home/vyacheslav/.rvm/gems/ruby-2.6.3/gems/actiontext-6.0.1/app/views/action_text/content/_layout.html.erb (Duration: 0.6ms | Allocations: 253)
[1m[36mActiveStorage::Attachment Load (0.5ms)[0m [1m[34mSELECT "active_storage_attachments".* FROM "active_storage_attachments" WHERE "active_storage_attachments"."record_id" = $1 AND "active_storage_attachments"."record_type" = $2 AND "active_storage_attachments"."name" = $3 LIMIT $4[0m [["record_id", 41], ["record_type", "Post"], ["name", "picture"], ["LIMIT", 1]]
↳ app/views/posts/_post.html.erb:22
[1m[36mCACHE Author Load (0.0ms)[0m [1m[34mSELECT "authors".* FROM "authors" WHERE "authors"."id" = $1 LIMIT $2[0m [["id", 1], ["LIMIT", 1]]
↳ app/views/posts/_post.html.erb:7
[1m[35m (0.6ms)[0m [1m[34mSELECT COUNT(DISTINCT "impressions"."ip_address") FROM "impressions" WHERE "impressions"."impressionable_id" = $1 AND "impressions"."impressionable_type" = $2[0m [["impressionable_id", 40], ["impressionable_type", "Post"]]
↳ app/views/posts/_post.html.erb:8
[1m[35m (0.4ms)[0m [1m[34mSELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = $1[0m [["post_id", 40]]
↳ app/views/posts/_post.html.erb:8
[1m[36mActionText::RichText Load (0.7ms)[0m [1m[34mSELECT "action_text_rich_texts".* FROM "action_text_rich_texts" WHERE "action_text_rich_texts"."record_id" = $1 AND "action_text_rich_texts"."record_type" = $2 AND "action_text_rich_texts"."name" = $3 LIMIT $4[0m [["record_id", 40], ["record_type", "Post"], ["name", "content"], ["LIMIT", 1]]
↳ app/views/posts/_post.html.erb:21
Rendered /home/vyacheslav/.rvm/gems/ruby-2.6.3/gems/actiontext-6.0.1/app/views/action_text/content/_layout.html.erb (Duration: 1.4ms | Allocations: 253)
[1m[36mActiveStorage::Attachment Load (0.3ms)[0m [1m[34mSELECT "active_storage_attachments".* FROM "active_storage_attachments" WHERE "active_storage_attachments"."record_id" = $1 AND "active_storage_attachments"."record_type" = $2 AND "active_storage_attachments"."name" = $3 LIMIT $4[0m [["record_id", 40], ["record_type", "Post"], ["name", "picture"], ["LIMIT", 1]]
↳ app/views/posts/_post.html.erb:22
[1m[36mCACHE Author Load (0.0ms)[0m [1m[34mSELECT "authors".* FROM "authors" WHERE "authors"."id" = $1 LIMIT $2[0m [["id", 1], ["LIMIT", 1]]
↳ app/views/posts/_post.html.erb:7
[1m[35m (0.8ms)[0m [1m[34mSELECT COUNT(DISTINCT "impressions"."ip_address") FROM "impressions" WHERE "impressions"."impressionable_id" = $1 AND "impressions"."impressionable_type" = $2[0m [["impressionable_id", 39], ["impressionable_type", "Post"]]
↳ app/views/posts/_post.html.erb:8
[1m[35m (0.5ms)[0m [1m[34mSELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = $1[0m [["post_id", 39]]
↳ app/views/posts/_post.html.erb:8
[1m[36mActionText::RichText Load (0.4ms)[0m [1m[34mSELECT "action_text_rich_texts".* FROM "action_text_rich_texts" WHERE "action_text_rich_texts"."record_id" = $1 AND "action_text_rich_texts"."record_type" = $2 AND "action_text_rich_texts"."name" = $3 LIMIT $4[0m [["record_id", 39], ["record_type", "Post"], ["name", "content"], ["LIMIT", 1]]
↳ app/views/posts/_post.html.erb:21
Rendered /home/vyacheslav/.rvm/gems/ruby-2.6.3/gems/actiontext-6.0.1/app/views/action_text/content/_layout.html.erb (Duration: 0.6ms | Allocations: 253)
[1m[36mActiveStorage::Attachment Load (0.5ms)[0m [1m[34mSELECT "active_storage_attachments".* FROM "active_storage_attachments" WHERE "active_storage_attachments"."record_id" = $1 AND "active_storage_attachments"."record_type" = $2 AND "active_storage_attachments"."name" = $3 LIMIT $4[0m [["record_id", 39], ["record_type", "Post"], ["name", "picture"], ["LIMIT", 1]]
↳ app/views/posts/_post.html.erb:22
[1m[36mCACHE Author Load (0.0ms)[0m [1m[34mSELECT "authors".* FROM "authors" WHERE "authors"."id" = $1 LIMIT $2[0m [["id", 1], ["LIMIT", 1]]
↳ app/views/posts/_post.html.erb:7
[1m[35m (0.5ms)[0m [1m[34mSELECT COUNT(DISTINCT "impressions"."ip_address") FROM "impressions" WHERE "impressions"."impressionable_id" = $1 AND "impressions"."impressionable_type" = $2[0m [["impressionable_id", 38], ["impressionable_type", "Post"]]
↳ app/views/posts/_post.html.erb:8
[1m[35m (0.4ms)[0m [1m[34mSELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = $1[0m [["post_id", 38]]
↳ app/views/posts/_post.html.erb:8
[1m[36mActionText::RichText Load (0.5ms)[0m [1m[34mSELECT "action_text_rich_texts".* FROM "action_text_rich_texts" WHERE "action_text_rich_texts"."record_id" = $1 AND "action_text_rich_texts"."record_type" = $2 AND "action_text_rich_texts"."name" = $3 LIMIT $4[0m [["record_id", 38], ["record_type", "Post"], ["name", "content"], ["LIMIT", 1]]
↳ app/views/posts/_post.html.erb:21
Rendered /home/vyacheslav/.rvm/gems/ruby-2.6.3/gems/actiontext-6.0.1/app/views/action_text/content/_layout.html.erb (Duration: 3.4ms | Allocations: 744)
[1m[36mActiveStorage::Attachment Load (0.3ms)[0m [1m[34mSELECT "active_storage_attachments".* FROM "active_storage_attachments" WHERE "active_storage_attachments"."record_id" = $1 AND "active_storage_attachments"."record_type" = $2 AND "active_storage_attachments"."name" = $3 LIMIT $4[0m [["record_id", 38], ["record_type", "Post"], ["name", "picture"], ["LIMIT", 1]]
↳ app/views/posts/_post.html.erb:22
[1m[36mCACHE Author Load (0.0ms)[0m [1m[34mSELECT "authors".* FROM "authors" WHERE "authors"."id" = $1 LIMIT $2[0m [["id", 1], ["LIMIT", 1]]
↳ app/views/posts/_post.html.erb:7
[1m[35m (0.9ms)[0m [1m[34mSELECT COUNT(DISTINCT "impressions"."ip_address") FROM "impressions" WHERE "impressions"."impressionable_id" = $1 AND "impressions"."impressionable_type" = $2[0m [["impressionable_id", 37], ["impressionable_type", "Post"]]
↳ app/views/posts/_post.html.erb:8
[1m[35m (0.4ms)[0m [1m[34mSELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = $1[0m [["post_id", 37]]
↳ app/views/posts/_post.html.erb:8
[1m[36mActionText::RichText Load (0.5ms)[0m [1m[34mSELECT "action_text_rich_texts".* FROM "action_text_rich_texts" WHERE "action_text_rich_texts"."record_id" = $1 AND "action_text_rich_texts"."record_type" = $2 AND "action_text_rich_texts"."name" = $3 LIMIT $4[0m [["record_id", 37], ["record_type", "Post"], ["name", "content"], ["LIMIT", 1]]
↳ app/views/posts/_post.html.erb:21
Rendered /home/vyacheslav/.rvm/gems/ruby-2.6.3/gems/actiontext-6.0.1/app/views/action_text/content/_layout.html.erb (Duration: 4.0ms | Allocations: 744)
[1m[36mActiveStorage::Attachment Load (0.2ms)[0m [1m[34mSELECT "active_storage_attachments".* FROM "active_storage_attachments" WHERE "active_storage_attachments"."record_id" = $1 AND "active_storage_attachments"."record_type" = $2 AND "active_storage_attachments"."name" = $3 LIMIT $4[0m [["record_id", 37], ["record_type", "Post"], ["name", "picture"], ["LIMIT", 1]]
↳ app/views/posts/_post.html.erb:22
[1m[36mCACHE Author Load (0.0ms)[0m [1m[34mSELECT "authors".* FROM "authors" WHERE "authors"."id" = $1 LIMIT $2[0m [["id", 1], ["LIMIT", 1]]
↳ app/views/posts/_post.html.erb:7
[1m[35m (0.5ms)[0m [1m[34mSELECT COUNT(DISTINCT "impressions"."ip_address") FROM "impressions" WHERE "impressions"."impressionable_id" = $1 AND "impressions"."impressionable_type" = $2[0m [["impressionable_id", 24], ["impressionable_type", "Post"]]
↳ app/views/posts/_post.html.erb:8
[1m[35m (2.3ms)[0m [1m[34mSELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = $1[0m [["post_id", 24]]
↳ app/views/posts/_post.html.erb:8
[1m[36mActionText::RichText Load (0.4ms)[0m [1m[34mSELECT "action_text_rich_texts".* FROM "action_text_rich_texts" WHERE "action_text_rich_texts"."record_id" = $1 AND "action_text_rich_texts"."record_type" = $2 AND "action_text_rich_texts"."name" = $3 LIMIT $4[0m [["record_id", 24], ["record_type", "Post"], ["name", "content"], ["LIMIT", 1]]
↳ app/views/posts/_post.html.erb:21
Rendered /home/vyacheslav/.rvm/gems/ruby-2.6.3/gems/actiontext-6.0.1/app/views/action_text/content/_layout.html.erb (Duration: 1.8ms | Allocations: 253)
[1m[36mActiveStorage::Attachment Load (0.3ms)[0m [1m[34mSELECT "active_storage_attachments".* FROM "active_storage_attachments" WHERE "active_storage_attachments"."record_id" = $1 AND "active_storage_attachments"."record_type" = $2 AND "active_storage_attachments"."name" = $3 LIMIT $4[0m [["record_id", 24], ["record_type", "Post"], ["name", "picture"], ["LIMIT", 1]]
↳ app/views/posts/_post.html.erb:22
[1m[36mCACHE Author Load (0.0ms)[0m [1m[34mSELECT "authors".* FROM "authors" WHERE "authors"."id" = $1 LIMIT $2[0m [["id", 1], ["LIMIT", 1]]
↳ app/views/posts/_post.html.erb:7
[1m[35m (0.5ms)[0m [1m[34mSELECT COUNT(DISTINCT "impressions"."ip_address") FROM "impressions" WHERE "impressions"."impressionable_id" = $1 AND "impressions"."impressionable_type" = $2[0m [["impressionable_id", 23], ["impressionable_type", "Post"]]
↳ app/views/posts/_post.html.erb:8
[1m[35m (1.0ms)[0m [1m[34mSELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = $1[0m [["post_id", 23]]
↳ app/views/posts/_post.html.erb:8
[1m[36mActionText::RichText Load (0.9ms)[0m [1m[34mSELECT "action_text_rich_texts".* FROM "action_text_rich_texts" WHERE "action_text_rich_texts"."record_id" = $1 AND "action_text_rich_texts"."record_type" = $2 AND "action_text_rich_texts"."name" = $3 LIMIT $4[0m [["record_id", 23], ["record_type", "Post"], ["name", "content"], ["LIMIT", 1]]
↳ app/views/posts/_post.html.erb:21
Rendered /home/vyacheslav/.rvm/gems/ruby-2.6.3/gems/actiontext-6.0.1/app/views/action_text/content/_layout.html.erb (Duration: 0.8ms | Allocations: 255)
[1m[36mActiveStorage::Attachment Load (0.6ms)[0m [1m[34mSELECT "active_storage_attachments".* FROM "active_storage_attachments" WHERE "active_storage_attachments"."record_id" = $1 AND "active_storage_attachments"."record_type" = $2 AND "active_storage_attachments"."name" = $3 LIMIT $4[0m [["record_id", 23], ["record_type", "Post"], ["name", "picture"], ["LIMIT", 1]]
↳ app/views/posts/_post.html.erb:22
[1m[36mCACHE Author Load (0.0ms)[0m [1m[34mSELECT "authors".* FROM "authors" WHERE "authors"."id" = $1 LIMIT $2[0m [["id", 1], ["LIMIT", 1]]
↳ app/views/posts/_post.html.erb:7
[1m[35m (0.7ms)[0m [1m[34mSELECT COUNT(DISTINCT "impressions"."ip_address") FROM "impressions" WHERE "impressions"."impressionable_id" = $1 AND "impressions"."impressionable_type" = $2[0m [["impressionable_id", 21], ["impressionable_type", "Post"]]
↳ app/views/posts/_post.html.erb:8
[1m[35m (0.4ms)[0m [1m[34mSELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = $1[0m [["post_id", 21]]
↳ app/views/posts/_post.html.erb:8
[1m[36mActionText::RichText Load (0.2ms)[0m [1m[34mSELECT "action_text_rich_texts".* FROM "action_text_rich_texts" WHERE "action_text_rich_texts"."record_id" = $1 AND "action_text_rich_texts"."record_type" = $2 AND "action_text_rich_texts"."name" = $3 LIMIT $4[0m [["record_id", 21], ["record_type", "Post"], ["name", "content"], ["LIMIT", 1]]
↳ app/views/posts/_post.html.erb:21
Rendered /home/vyacheslav/.rvm/gems/ruby-2.6.3/gems/actiontext-6.0.1/app/views/action_text/content/_layout.html.erb (Duration: 1.0ms | Allocations: 253)
[1m[36mActiveStorage::Attachment Load (1.8ms)[0m [1m[34mSELECT "active_storage_attachments".* FROM "active_storage_attachments" WHERE "active_storage_attachments"."record_id" = $1 AND "active_storage_attachments"."record_type" = $2 AND "active_storage_attachments"."name" = $3 LIMIT $4[0m [["record_id", 21], ["record_type", "Post"], ["name", "picture"], ["LIMIT", 1]]
↳ app/views/posts/_post.html.erb:22
[1m[36mCACHE Author Load (0.0ms)[0m [1m[34mSELECT "authors".* FROM "authors" WHERE "authors"."id" = $1 LIMIT $2[0m [["id", 1], ["LIMIT", 1]]
↳ app/views/posts/_post.html.erb:7
[1m[35m (0.7ms)[0m [1m[34mSELECT COUNT(DISTINCT "impressions"."ip_address") FROM "impressions" WHERE "impressions"."impressionable_id" = $1 AND "impressions"."impressionable_type" = $2[0m [["impressionable_id", 20], ["impressionable_type", "Post"]]
↳ app/views/posts/_post.html.erb:8
[1m[35m (0.4ms)[0m [1m[34mSELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = $1[0m [["post_id", 20]]
↳ app/views/posts/_post.html.erb:8
[1m[36mActionText::RichText Load (0.4ms)[0m [1m[34mSELECT "action_text_rich_texts".* FROM "action_text_rich_texts" WHERE "action_text_rich_texts"."record_id" = $1 AND "action_text_rich_texts"."record_type" = $2 AND "action_text_rich_texts"."name" = $3 LIMIT $4[0m [["record_id", 20], ["record_type", "Post"], ["name", "content"], ["LIMIT", 1]]
↳ app/views/posts/_post.html.erb:21
Rendered /home/vyacheslav/.rvm/gems/ruby-2.6.3/gems/actiontext-6.0.1/app/views/action_text/content/_layout.html.erb (Duration: 0.9ms | Allocations: 253)
[1m[36mActiveStorage::Attachment Load (0.3ms)[0m [1m[34mSELECT "active_storage_attachments".* FROM "active_storage_attachments" WHERE "active_storage_attachments"."record_id" = $1 AND "active_storage_attachments"."record_type" = $2 AND "active_storage_attachments"."name" = $3 LIMIT $4[0m [["record_id", 20], ["record_type", "Post"], ["name", "picture"], ["LIMIT", 1]]
↳ app/views/posts/_post.html.erb:22
[1m[36mCACHE Author Load (0.0ms)[0m [1m[34mSELECT "authors".* FROM "authors" WHERE "authors"."id" = $1 LIMIT $2[0m [["id", 1], ["LIMIT", 1]]
↳ app/views/posts/_post.html.erb:7
[1m[35m (0.5ms)[0m [1m[34mSELECT COUNT(DISTINCT "impressions"."ip_address") FROM "impressions" WHERE "impressions"."impressionable_id" = $1 AND "impressions"."impressionable_type" = $2[0m [["impressionable_id", 13], ["impressionable_type", "Post"]]
↳ app/views/posts/_post.html.erb:8
[1m[35m (0.5ms)[0m [1m[34mSELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = $1[0m [["post_id", 13]]
↳ app/views/posts/_post.html.erb:8
[1m[36mActionText::RichText Load (0.3ms)[0m [1m[34mSELECT "action_text_rich_texts".* FROM "action_text_rich_texts" WHERE "action_text_rich_texts"."record_id" = $1 AND "action_text_rich_texts"."record_type" = $2 AND "action_text_rich_texts"."name" = $3 LIMIT $4[0m [["record_id", 13], ["record_type", "Post"], ["name", "content"], ["LIMIT", 1]]
↳ app/views/posts/_post.html.erb:21
Rendered /home/vyacheslav/.rvm/gems/ruby-2.6.3/gems/actiontext-6.0.1/app/views/action_text/content/_layout.html.erb (Duration: 0.9ms | Allocations: 256)
[1m[36mActiveStorage::Attachment Load (0.5ms)[0m [1m[34mSELECT "active_storage_attachments".* FROM "active_storage_attachments" WHERE "active_storage_attachments"."record_id" = $1 AND "active_storage_attachments"."record_type" = $2 AND "active_storage_attachments"."name" = $3 LIMIT $4[0m [["record_id", 13], ["record_type", "Post"], ["name", "picture"], ["LIMIT", 1]]
↳ app/views/posts/_post.html.erb:22
[1m[36mCACHE Author Load (0.1ms)[0m [1m[34mSELECT "authors".* FROM "authors" WHERE "authors"."id" = $1 LIMIT $2[0m [["id", 1], ["LIMIT", 1]]
↳ app/views/posts/_post.html.erb:7
[1m[35m (0.7ms)[0m [1m[34mSELECT COUNT(DISTINCT "impressions"."ip_address") FROM "impressions" WHERE "impressions"."impressionable_id" = $1 AND "impressions"."impressionable_type" = $2[0m [["impressionable_id", 12], ["impressionable_type", "Post"]]
↳ app/views/posts/_post.html.erb:8
[1m[35m (0.4ms)[0m [1m[34mSELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = $1[0m [["post_id", 12]]
↳ app/views/posts/_post.html.erb:8
[1m[36mActionText::RichText Load (0.3ms)[0m [1m[34mSELECT "action_text_rich_texts".* FROM "action_text_rich_texts" WHERE "action_text_rich_texts"."record_id" = $1 AND "action_text_rich_texts"."record_type" = $2 AND "action_text_rich_texts"."name" = $3 LIMIT $4[0m [["record_id", 12], ["record_type", "Post"], ["name", "content"], ["LIMIT", 1]]
↳ app/views/posts/_post.html.erb:21
Rendered /home/vyacheslav/.rvm/gems/ruby-2.6.3/gems/actiontext-6.0.1/app/views/action_text/content/_layout.html.erb (Duration: 0.6ms | Allocations: 253)
[1m[36mActiveStorage::Attachment Load (0.3ms)[0m [1m[34mSELECT "active_storage_attachments".* FROM "active_storage_attachments" WHERE "active_storage_attachments"."record_id" = $1 AND "active_storage_attachments"."record_type" = $2 AND "active_storage_attachments"."name" = $3 LIMIT $4[0m [["record_id", 12], ["record_type", "Post"], ["name", "picture"], ["LIMIT", 1]]
↳ app/views/posts/_post.html.erb:22
[1m[36mAuthor Load (0.6ms)[0m [1m[34mSELECT "authors".* FROM "authors" WHERE "authors"."id" = $1 LIMIT $2[0m [["id", 2], ["LIMIT", 1]]
↳ app/views/posts/_post.html.erb:7
[1m[35m (0.7ms)[0m [1m[34mSELECT COUNT(DISTINCT "impressions"."ip_address") FROM "impressions" WHERE "impressions"."impressionable_id" = $1 AND "impressions"."impressionable_type" = $2[0m [["impressionable_id", 3], ["impressionable_type", "Post"]]
↳ app/views/posts/_post.html.erb:8
[1m[35m (0.5ms)[0m [1m[34mSELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = $1[0m [["post_id", 3]]
↳ app/views/posts/_post.html.erb:8
[1m[36mActionText::RichText Load (0.2ms)[0m [1m[34mSELECT "action_text_rich_texts".* FROM "action_text_rich_texts" WHERE "action_text_rich_texts"."record_id" = $1 AND "action_text_rich_texts"."record_type" = $2 AND "action_text_rich_texts"."name" = $3 LIMIT $4[0m [["record_id", 3], ["record_type", "Post"], ["name", "content"], ["LIMIT", 1]]
↳ app/views/posts/_post.html.erb:21
[1m[36mActiveStorage::Attachment Load (0.3ms)[0m [1m[34mSELECT "active_storage_attachments".* FROM "active_storage_attachments" WHERE "active_storage_attachments"."record_id" = $1 AND "active_storage_attachments"."record_type" = $2 AND "active_storage_attachments"."name" = $3 LIMIT $4[0m [["record_id", 3], ["record_type", "Post"], ["name", "picture"], ["LIMIT", 1]]
↳ app/views/posts/_post.html.erb:22
[1m[36mCACHE Author Load (0.0ms)[0m [1m[34mSELECT "authors".* FROM "authors" WHERE "authors"."id" = $1 LIMIT $2[0m [["id", 2], ["LIMIT", 1]]
↳ app/views/posts/_post.html.erb:7
[1m[35m (0.4ms)[0m [1m[34mSELECT COUNT(DISTINCT "impressions"."ip_address") FROM "impressions" WHERE "impressions"."impressionable_id" = $1 AND "impressions"."impressionable_type" = $2[0m [["impressionable_id", 2], ["impressionable_type", "Post"]]
↳ app/views/posts/_post.html.erb:8
[1m[35m (0.4ms)[0m [1m[34mSELECT COUNT(*) FROM "comments" WHERE "comments"."post_id" = $1[0m [["post_id", 2]]
↳ app/views/posts/_post.html.erb:8
[1m[36mActionText::RichText Load (0.5ms)[0m [1m[34mSELECT "action_text_rich_texts".* FROM "action_text_rich_texts" WHERE "action_text_rich_texts"."record_id" = $1 AND "action_text_rich_texts"."record_type" = $2 AND "action_text_rich_texts"."name" = $3 LIMIT $4[0m [["record_id", 2], ["record_type", "Post"], ["name", "content"], ["LIMIT", 1]]
↳ app/views/posts/_post.html.erb:21
[1m[36mActiveStorage::Attachment Load (0.3ms)[0m [1m[34mSELECT "active_storage_attachments".* FROM "active_storage_attachments" WHERE "active_storage_attachments"."record_id" = $1 AND "active_storage_attachments"."record_type" = $2 AND "active_storage_attachments"."name" = $3 LIMIT $4[0m [["record_id", 2], ["record_type", "Post"], ["name", "picture"], ["LIMIT", 1]]
↳ app/views/posts/_post.html.erb:22
Rendered collection of posts/_post.html.erb [14 times] (Duration: 340.3ms | Allocations: 73088)
Rendered posts/index.html.erb within layouts/application (Duration: 346.1ms | Allocations: 74231)
Completed 500 Internal Server Error in 417ms (ActiveRecord: 33.2ms | Allocations: 141446)
解决方案
推荐阅读
- latex - 如何在 Latex 中使用“&”
- bash - 如何在script.sh文件的函数列表中一个一个地执行两个函数
- google-chrome-extension - 如何在 chrome 扩展项目中使用按钮在两种语言之间切换
- java - 如何在不同类型的Java中创建一个包含2个数组的数组
- linux - 如何使用 ansible 启动实例并开始使用 Ansible 配置环境
- javascript - 如何在 ReactJS 中计算滚动条上的元素
- javascript - 如何避免html5视频中的playbackRate变量变化以及如何克服它?
- objective-c - 在 macOS 的循环执行期间允许用户输入
- android - Android 6 上的原生粉碎?
- sql - 重复值不应在 SQL 中一起显示