title: how to specify path to js file in lib/assets using rails 3.2 asset pipeline
body: <p>I have these files in my lib/assets folder (sketchyPad is a jQuery plugin for drawing on html5 canvas and farbastic is a color picker used by sketchyPad):</p>
  
  <pre><code>lib/
  |-- assets
  |   |-- javascripts
  |   |   `-- lib.js
  |   `-- sketchyPad
  |       |-- README.md
  |       |-- brushes
  |       |   |-- simple.js
  |       |   `-- smooth.js
  |       |-- example
  |       |   |-- index.html
  |       |   |-- jquery-ui-1.8.16.custom
  |       |   |   |-- css
  |       |   |   |   `-- ui-lightness
  |       |   |   |       |-- images
  |       |   |   |       |   |-- ui-bg_diagonals-thick_18_b81900_40x40.png
  |       |   |   |       |   |-- ui-bg_diagonals-thick_20_666666_40x40.png
  |       |   |   |       |   |-- ui-bg_flat_10_000000_40x100.png
  |       |   |   |       |   |-- ui-bg_glass_100_f6f6f6_1x400.png
  |       |   |   |       |   |-- ui-bg_glass_100_fdf5ce_1x400.png
  |       |   |   |       |   |-- ui-bg_glass_65_ffffff_1x400.png
  |       |   |   |       |   |-- ui-bg_gloss-wave_35_f6a828_500x100.png
  |       |   |   |       |   |-- ui-bg_highlight-soft_100_eeeeee_1x100.png
  |       |   |   |       |   |-- ui-bg_highlight-soft_75_ffe45c_1x100.png
  |       |   |   |       |   |-- ui-icons_222222_256x240.png
  |       |   |   |       |   |-- ui-icons_228ef1_256x240.png
  |       |   |   |       |   |-- ui-icons_ef8c08_256x240.png
  |       |   |   |       |   |-- ui-icons_ffd27a_256x240.png
  |       |   |   |       |   `-- ui-icons_ffffff_256x240.png
  |       |   |   |       `-- jquery-ui-1.8.16.custom.css
  |       |   |   `-- js
  |       |   |       `-- jquery-ui-1.8.16.custom.min.js
  |       |   |-- jquery.min.js
  |       |   `-- mattfarina-farbtastic-4bb6bbf
  |       |       |-- CHANGELOG.html
  |       |       |-- LICENSE.txt
  |       |       |-- README.html
  |       |       |-- README.md
  |       |       |-- demo1.html
  |       |       |-- demo2.html
  |       |       |-- farbtastic.css
  |       |       |-- farbtastic.js
  |       |       |-- farbtastic.min.js
  |       |       |-- marker.png
  |       |       |-- mask.png
  |       |       `-- wheel.png
  |       |-- sketchyPad.css
  |       `-- sketchyPad.js
  </code></pre>
  
  <p>So I want to include sketchyPad.js, sketchyPad.css and also all the js in the brushes folder and also the farbtastic.min js file.</p>
  
  <p>In app/assets/javascripts/application.js I put:</p>
  
  <pre><code>//= require sketchyPad (this part works fine and correctly includes sketchyPad.js)
  </code></pre>
  
  <p>but I also want to include</p>
  
  <pre><code>lib/assets/sketchyPad/brushes/simple.js
  lib/assets/sketchyPad/brushes/smooth.js
  </code></pre>
  
  <p>and any other js files in the brushes folder, how do I use require_directory when it is not in the app/assets but in the lib/assets or vendor/assets? </p>
  
  <p>Update:</p>
  
  <p>I have tried</p>
  
  <pre><code>require_tree sketchyPad
  </code></pre>
  
  <p>but errors with:</p>
  
  <pre><code>require_tree argument must be a relative path
  </code></pre>
  
  <p>I have tried</p>
  
  <pre><code>require_tree ./sketchyPad
  </code></pre>
  
  <p>but errors with:</p>
  
  <pre><code>require_tree argument must be a directory
  </code></pre>
  
  <p>I think require_tree must be relative to the app/assets folder, but putting something like</p>
  
  <pre><code>require_tree ./../lib/assets/sketchyPad/brushes
  </code></pre>
  
  <p>also gives error:</p>
  
  <p>require_tree argument must be a directory</p>
  
  <p>Eitherway I don't want to include the entire sketchyPad tree, because it does contain some js files that I don't want to include... like examples and it's own version of older jQuery.</p>
  
  <p>UPDATE:</p>
  
  <p>What I ended up doing was creating a lib.js in the lib/assets/javascripts folder with a manifest to include the sketchyPad js files as relative to the lib/assets folder rather than the app/assets folder.</p>
  
  <p>in app/assets/javascripts/application.js I put:</p>
  
  <pre><code>//= require jquery
  //= require jquery_ujs
  //= require jquery-ui
  //= require lib
  </code></pre>
  
  <p>and in lib/assets/javascripts/lib.js I put:</p>
  
  <pre><code>//= require ./../sketchyPad/sketchyPad
  //= require_tree ./../sketchyPad/brushes
  //= require ./../sketchyPad/example/mattfarina-farbtastic-4bb6bbf/farbtastic.min
  </code></pre>
  
  <p>That appears to include the correct files.  Was there an easier way to do this?</p>