nXhtml (No javascript-mode/eruby-javascript)

I’ve just installed nXhtml by downloading their zip file, extracting the archive into my home directory and adding (load "/home/spinlock/nxhtml/autostart.el") to my .emacs file. My problem is that when I try to edit a .js.erb file, I’m getting the error:

(No javascript-mode/eruby-javascript)

and I’m not getting the syntax highlighting that I’d expect (for instance, comments are the same color as javascript code). However, when I move the cursor inside a Ruby section of this file, that notice changes to:

  • How can I stop emacs from indenting the 2nd line of a javascript comma-separated list (e.g. array or json)?
  • Hotkey to find syntax warnings in Emacs js2-mode?
  • How can I use DoctorJS with Emacs?
  • How to get js-mode to properly indent continued (compound?) var declarations?
  • What does your .conkerorrc look like?
  • Running npm globally installed packages
  • (Ruby/eruby-javascript)
    

    which I take as a good sign plus it does look like I’ve got the proper Ruby syntax highlighting in this part of the buffer (e.g. comments are show in red font).

    I assume that I need to add a configuration file that tells emacs how to manage javascript-mode but I have no clue how to do this. Any help would be greatly appreciated.

    Thanks!

  • How to get js-mode to properly indent continued (compound?) var declarations?
  • Javascript major mode in Emacs
  • How can I run jslint as a javascript compile tool in emacs for Windows?
  • Is there a way to get JavaScript syntax coloring in emacs inside the .html file?
  • How do I get js2-mode to use spaces instead of tabs in Emacs?
  • Emacs JS mode for npm style