Rails 5.2.1 triggers `ActionView::Template::Error (undefined not callable)`
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 32/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- bootstrap, javascript, rails
- 領域
- build-system, frontend
調査の方向性
報告されたアセット設定で、app/views/layouts/application.html.erb から発生する Rails 5.2.1 の失敗を再現します。まず lib/bootstrap/engine.rb の require 'autoprefixer-rails' の行から始め、次に application.scss と application.js を調べて相互作用を切り分けます。最初のページが ActionView::Template::Error なしで読み込まれ、Bootstrap のアセットが引き続き機能すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Problem
Having Rails 5.2.1, server successfully starts up but on the first page load, an error appears from my application.html.erb:
ActionView::Template::Error (undefined not callable):
5: <%= csrf_meta_tags %>
6: <%= csp_meta_tag %>
7:
8: <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
9: <%= javascipt_include_tag 'application', 'data-turbolinks-track': 'reload' %>
10:
(execjs):1
app/views/layouts/application.html.erb:8:in `_app_views_layouts_application_html_erb__765064803_56530640'
Configuration
From bundle list:
- Rails 5.2.1
- autoprefixer-rails 9.3.1
- bootstrap 4.1.3
- jquery-rails 4.3.3
- sprockets 3.7.2
- sprockets-rails 3.2.1
My application.scss has @import "bootstrap":
@import 'my-application-stuff/*';
@import 'bootstrap';
body {
...
}
My application.js is
//= require rails-ujs
//= require jquery
//= require activestorage
//= require turbolinks
//= require jquery3
//= require popper
//= require bootstrap-sprockets
//= require_tree .
Hints
After trying by commenting out excerpts of code and restarting, I came to the conclusion that the culprit is require 'autoprefixer-rails from engine.rb. However, I could not figure out why but when commenting this line, I can successfully load my pages with bootstrap.
Comments
My issue seems to be different from https://github.com/twbs/bootstrap-rubygem/issues/164, hence a different issue
After seeing https://github.com/twbs/bootstrap-rubygem/issues/162, just in case, I have Node v11.1.0 with NPM 6.4.1
- 主要言語
- SCSS
- スター
- 2k
- フォーク
- 437
- 平均マージ
- 1時間
- マージ済み PR(30日)
- 1
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
twbs/bootstrap-rubygem のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
twbs/bootstrap-rubygem#294 · リアクション 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
twbs/bootstrap-rubygem#291 · コメント 2 件 · リアクション 7 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 38/100
twbs/bootstrap-rubygem#289 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
twbs/bootstrap-rubygem#288 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
twbs/bootstrap-rubygem#284 ·
twbs/bootstrap-rubygem の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
bazel-contrib/rules_go#4726 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
HL7/fhir-ig-publisher#1375 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
area/install-update comp/cli comp/desktop P3 sweeper:risk-compatibility type/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
NousResearch/hermes-agent#122386 · コメント 1 件 ·