ExecJS::ProgramError on a new Rails 5.2 application
Chrisgo-75 opened this issue · 3 comments
Chrisgo-75 commented
I have a fresh built Rails 5.2 application. I add gem 'bootstrap', '~> 5.0.1'
to Gemfile and run bundle command. When I run the rails server and go to a test page I get the below:
ExecJS::ProgramError
Completed 500 Internal Server Error in 183ms (ActiveRecord: 0.0ms)
ActionView::Template::Error (TypeError: Cannot read property 'version' of undefined):
5: <%= csrf_meta_tags %>
6: <%= csp_meta_tag %>
7:
8: <%= stylesheet_link_tag 'application', media: 'all' %>
9: <%= javascript_include_tag 'application' %>
10: </head>
11:
(execjs):19:14
(execjs):1:102
app/views/layouts/application.html.erb:8:in `_app_views_layouts_application_html_erb___2379289235630148577_14000'
/usr/local/rvm/gems/ruby-2.7.2-rg316@v2bldg_access/gems/execjs-2.8.1/lib/execjs/external_runtime.rb:85: warning: __FILE__ in eval may not return location in binding; use Binding#source_location instead
/usr/local/rvm/gems/ruby-2.7.2-rg316@v2bldg_access/gems/web-console-3.7.0/lib/web_console/exception_mapper.rb:31: warning: in `eval'
/usr/local/rvm/gems/ruby-2.7.2-rg316@v2bldg_access/gems/execjs-2.8.1/lib/execjs/external_runtime.rb:39: warning: __FILE__ in eval may not return location in binding; use Binding#source_location instead
Chrisgo-75 commented
Issue resolved.
- My development environment is Ubuntu.
- Rebuilt the application w/o coffee-script
--skip-coffee
. Which didn't fix the issue. - Added
gem 'mini_racer'
and this solved the issue.
fatimamomin13 commented
thanks alot @Chrisgo-75
awallsr commented
thank you very much @Chrisgo-75