title: ExecJS::RuntimeError in ChatRooms#show
body: <p>The issue I'm having:</p>
  
  <p><img src="https://i.stack.imgur.com/lL8JG.png" alt="enter image description here"></p>
  
  <p>This is my room.coffee file, and everything works well.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>jQuery(document).on 'turbolinks:load', -&gt;
    messages = $('#messages')
    if $('#messages').length &gt; 0
  
      App.global_chat = App.cable.subscriptions.create {
          channel: "ChatRoomsChannel"
          chat_room_id: messages.data('chat-room-id')
        },
        connected: -&gt;
          # Called when the subscription is ready for use on the server
  
        disconnected: -&gt;
          # Called when the subscription has been terminated by the server
  
        received: (data) -&gt;
          # Data received
  
        send_message: (message, chat_room_id) -&gt;
          @perform 'send_message', message: message, chat_room_id: chat_room_id</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>@import "bootstrap-sprockets";
  @import "bootstrap";
  
  #messages {
    max-height: 450px;
    overflow-y: auto;
    .avatar {
      margin: 0.5rem;
    }
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;h1&gt;&lt;%= @chat_room.title %&gt;&lt;/h1&gt;
  
  &lt;div id="messages" data-chat-room-id="&lt;%= @chat_room.id %&gt;"&gt;
    &lt;%= render @chat_room.messages %&gt;
  &lt;/div&gt;
  
  &lt;hr&gt;
  
  &lt;%= form_for @message, url: '#' do |f| %&gt;
    &lt;%= hidden_field_tag 'chat_room_id', @chat_room.id %&gt;
    &lt;div class="form-group"&gt;
      &lt;%= f.label :body %&gt;
      &lt;%= f.text_area :body, class: 'form-control' %&gt;
      &lt;small class="text-muted"&gt;From 2 to 1000 characters&lt;/small&gt;
    &lt;/div&gt;
  
    &lt;%= f.submit "Post", class: 'btn btn-primary btn-lg' %&gt;
  &lt;% end %&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>But it shows ExecJS::RuntimeError after I added the code down below in the same file.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$('#new_message').submit (e) -&gt;
        $this = $(this)
        textarea = $this.find('#message_body')
        if $.trim(textarea.val()).length &gt; 1
          App.global_chat.send_message textarea.val(), messages.data('chat-room-id')
          textarea.val('')
        e.preventDefault()
        return false</code></pre>
  </div>
  </div>
  </p>
  
  <p>I did search similar problems a lot, and most people who use pc encountered this issue. But I'm using mac, I have no idea why I got this error as well. </p>