Note that there are some explanatory texts on larger screens.

plurals
  1. POExecJS::RuntimeError in rails 3.2.8 engine with javascript_include_tag
    text
    copied!<p>We are putting two rails 3.2.8 engines together in one rails app. The problem is that ExecJS does not like namespace for javascript_inclide_tag in layouts file. Here is the tag which causing the error:</p> <pre><code>&lt;%= javascript_include_tag 'authentify/application' %&gt; </code></pre> <p>Here authentify is rails engine name. The error is:</p> <pre><code>ExecJS::RuntimeError in Authentify/sessions#new Showing C:/D/code/rails_proj/engines/authentify/app/views/layouts/sessions.html.erb where line #6 raised: (in C:/D/code/rails_proj/engines/authentify/app/assets/javascripts/authentify/sessions.js.coffee) Extracted source (around line #6): 3: &lt;head&gt; 4: &lt;title&gt;Login&lt;/title&gt; 5: &lt;%= stylesheet_link_tag "authentify/application" %&gt; 6: &lt;%= javascript_include_tag "authentify/application" %&gt; 7: &lt;%= csrf_meta_tags %&gt; 8: &lt;/head&gt; 9: </code></pre> <p>If we delete the namespace authentify (<code>&lt;%= javascript_include_tag "application" %&gt;</code>), then the ExecJS error disappears and the rails app works. There is the same error for another rails engine with the js tag.</p> <p>We are using windows environment. What could cause the error? Thanks for the help. </p> <p>UPDATE:</p> <p>In engine.rb for authentify, every js libraries are listed as:</p> <pre><code>initializer "Authentify precompile hook", :group =&gt; :all do |app| app.config.assets.precompile += [ 'authentify/application.css.scss', 'authentify/layout.css.scss', 'authentify/login.css.scss', 'authentify/paginate.css.scss', 'authentify/sessions.css.scss', 'authentify/sys_logs.css.scss', 'authentify/toolbar.css.scss', 'authentify/user_level_group_map.css', 'authentify/user_menus.css.scss', 'authentify/users.css.scss', 'authentify/application.js', 'authentify/sessions.js.coffee', 'authentify/sys_logs.js.coffee', 'authentify/user_level_group_map.js', 'authentify/user_menus.js.coffee', 'authentify/users.js'] end </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload