Rails 5.2.1 triggers `ActionView::Template::Error (undefined not callable)`
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 32/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- bootstrap, javascript, rails
- Domain
- build-system, frontend
Research direction
Reproduce the Rails 5.2.1 failure from app/views/layouts/application.html.erb with the reported asset configuration. Start with the require 'autoprefixer-rails' line in lib/bootstrap/engine.rb, then inspect application.scss and application.js to isolate the interaction. Done means the first page loads without ActionView::Template::Error while Bootstrap assets still work.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- SCSS
- Stars
- 2k
- Forks
- 437
- Avg merge
- 1h
- Merged PRs (30d)
- 1
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from twbs/bootstrap-rubygem
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
twbs/bootstrap-rubygem#294 · 1 reaction ·
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
twbs/bootstrap-rubygem#291 · 2 comments · 7 reactions ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 38/100
twbs/bootstrap-rubygem#289 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
twbs/bootstrap-rubygem#288 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
twbs/bootstrap-rubygem#284 ·
All issues in twbs/bootstrap-rubygem
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
typelevel/sbt-typelevel#929 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
openSUSE/python-rpm-macros#219 ·
-
HMR stops working Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
Qiskit/mcp-servers#221 ·