Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ExecJS::ProgramError on a new Rails 5.2 application #219

Closed
Chrisgo-75 opened this issue May 20, 2021 · 3 comments
Closed

ExecJS::ProgramError on a new Rails 5.2 application #219

Chrisgo-75 opened this issue May 20, 2021 · 3 comments

Comments

@Chrisgo-75
Copy link

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
Copy link
Author

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
Copy link

thanks alot @Chrisgo-75

@awallsr
Copy link

awallsr commented Nov 4, 2022

thank you very much @Chrisgo-75

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants