ExecJS::ProgramError after adding bootstrap gem
Nobody has claimed this yet.
- Dominant language
- SCSS
- Stars
- 2k
- Forks
- 437
- Avg merge
- 1h
- Merged PRs (30d)
- 1
Description
After adding the bootstrap gem to my brand new Rails app and importing it in application.scss, my pages fail with
ExecJS::ProgramError in Home#index
Showing C:/Source/Repos/graph-tutorials/ruby-test/app/views/layouts/application.html.erb where line #8 raised:
identifier '(function(opts, pluginOpts) {return eval(process' undefined
Rails.root: C:/Source/Repos/graph-tutorials/ruby-test
- Ruby 2.5.1
- Rails 5.2.0
- Windows 10
Steps to reproduce:
-
Run
rails new ruby-test -
CD to
ruby-test, edit Gemfile -
Change
sqlite3line to load from GitHub (for Ruby 2.5 on Windows compatibility):gem 'sqlite3', git: 'https://github.com/sparklemotion/sqlite3-ruby' -
Run
bundle install -
Run
rails generate controller Home index -
Run
rails server -
Browse to http://localhost:3000/home/index and verify the page renders
-
Add bootstrap to Gemfile, bundle install
-
Rename
application.csstoapplication.scss, replace contents of file with:// Custom bootstrap variables must be set or imported *before* bootstrap. @import "bootstrap"; -
Restart server
-
Browse to http://localhost:3000/home/index, see error.
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.
Research direction
Reproduce the failure using the listed Windows, Ruby, and Rails versions, then inspect Gemfile, app/assets/stylesheets/application.scss, and the layout entry at app/views/layouts/application.html.erb. Start with the bootstrap import and asset compilation path; done means the Home#index page renders after the import without an ExecJS::ProgramError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bootstrap, rails, ruby, scss
- Domain
- build-system, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100