title: Node / NPM dependency with Ruby on Rails engine gem asset pipeline
body: <p>I am building a Ruby on Rails engine packaged inside of a gem and can't figure out how to ensure that an NPM dependency is loaded.</p>
  
  <p>In a regular Rails application you can install NPM, then use the <code>npm install</code> command to put packages in the <code>node_modules</code> base directory. Then add <code>node_modules</code> to the asset pipeline with this line this in your <code>application.rb</code>:</p>
  
  <pre><code>config.assets.paths &lt;&lt; Rails.root.join('node_modules')
  </code></pre>
  
  <p>However, in my case I'm building a <em>Rails engine</em> to be loaded as a gem. The <code>.gemspec</code> file lets your gem load other Ruby dependencies into the host application, but I don't know how to do the same for Node dependendies. What's the proper way to note in my engine that it requires certain NPM modules to work so that they get installed in the host application?</p>