Answer the question
In order to leave comments, you need to log in
Ruby on Rails TypeError?
I'm trying to create a simple application
on the page localhost:3000/posts
ExecJS::ProgramError in Posts#index
Showing f:/ror/netzke_task_manager/app/views/layouts/application.html.erb where line #7 raised:
TypeError: Объект не поддерживает это свойство или метод
Extracted source (around line #7):
5
6
7
8
9
10
<%= csrf_meta_tags %>
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
</head>
Rails.root: f:/ror/netzke_task_manager
Application Trace | Framework Trace | Full Trace
execjs (2.7.0) lib/execjs/external_runtime.rb:39:in `exec'
execjs (2.7.0) lib/execjs/external_runtime.rb:21:in `eval'
'
Answer the question
In order to leave comments, you need to log in
Its problem with turbolinks gem so its creating error
So in app\views\layouts\application.html.erb change this
<%= stylesheet_link_tag 'application.css', media: 'all', 'data-turbolinks-track': 'reload ' %>
<%= javascript_include_tag 'application.js', 'data-turbolinks-track': 'reload' %>
from
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': ' reload' %>
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
and uncomment the line no.15 in app\assets\javascripts\application.js
require turbolinks
and copy it into app\ assets\stylesheets\application.css at the end of file
From this your css and js will be run
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question