Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8899359
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T00:50:09+00:00 2026-06-15T00:50:09+00:00

We are putting two rails 3.2.8 engines together in one rails app. The problem

  • 0

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:

<%= javascript_include_tag 'authentify/application' %>

Here authentify is rails engine name. The error is:

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: <head>
4:   <title>Login</title>
5:   <%= stylesheet_link_tag    "authentify/application" %>
6:   <%= javascript_include_tag "authentify/application" %>
7:   <%= csrf_meta_tags %>
8: </head>
9: 

If we delete the namespace authentify (<%= javascript_include_tag "application" %>), then the ExecJS error disappears and the rails app works. There is the same error for another rails engine with the js tag.

We are using windows environment. What could cause the error? Thanks for the help.

UPDATE:

In engine.rb for authentify, every js libraries are listed as:

initializer "Authentify precompile hook", :group => :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
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T00:50:10+00:00Added an answer on June 15, 2026 at 12:50 am

    See this question: Using javascript_include_tag with a Subfolder full of JS

    Can you have an initializer for each engine? In which case you could have:

    Initializer for one (call it authentify) – e.g. authentify.rb as one initializer for engine A:

    ActionView::Helpers::AssetTagHelper.register_javascript_expansion :authentify => Dir["#{Rails.root.to_s}/public/javascripts/authentify/*.js"].each {|js| js.gsub!("#{Rails.root.to_s}/public/javascripts/",'')}
    

    Initializer for the other (call it authentify2) – e.g. authentify2.rb as one initializer for engine B:

    ActionView::Helpers::AssetTagHelper.register_javascript_expansion :authentify2 => Dir["#{Rails.root.to_s}/public/javascripts/authentify2/*.js"].each {|js| js.gsub!("#{Rails.root.to_s}/public/javascripts/",'')}
    

    and then you can have:

    <%= javascript_include_tag :authentify %>
    

    in one layout and:

    <%= javascript_include_tag :authentify2 %>
    

    in the other, and just remove the <%= javascript_include_tag 'authentify/application' %> in your layout as well as the other javascript_include_tag tag for your other engine.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm basically putting together an app that does a super simple question => answer
I'm putting together a Rails app, and I've run into a bit of an
I am pulling two fields and putting them together with a -. When I
I'm putting together a JavaScript object called ListBox which takes a two-dimensional array, and
I'm putting together a simple test made up of two tutorials available online for
So, I have an app/assets/stylesheets/ directory structure that looks something like this: |-dialogs |-mixins
I have a Ruby on Rails application that has two active environments, Stage and
I'm in the planning stages of a website that will match two users together
Rails 2.3.5 I've never tried putting two forms inside a single table or putting
I have a Rails application that does a lot of media encoding. I am

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.