Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Asset Pipeline: cannot include single file from lib? #2767

carhartl opened this Issue · 3 comments

2 participants


Using Rails 3.1.0, I have:

# Rails.application.config.assets.paths

["/Users/carhartl/Workspace/", "/Users/carhartl/Workspace/", "/Users/carhartl/Workspace/", "/Users/carhartl/Workspace/", "/Users/carhartl/Workspace/", "/Users/carhartl/Workspace/"]

In lib/assets/javascripts there is a file named simulate_touch.js which I am trying to require from app/assets/javascripts/application.js:

//= require_tree .
//= require simulate_touch

This gives me such error:

couldn't find file 'simulate_touch'
  (in /Users/carhartl/Workspace/

Resorting to

//= require_tree .
//= require_tree ./../../../lib/assets/javascripts

works but doesn't seem to be the way it's meant to be. Anyway, is my former usage correct or not? The Rails guide on asset pipeline seems to suggest it is...


Works for me, same scenario (I have my require before require_tree though)


Strange. I think I've tested tried requiring from lib without anything else, but let me double check.


I was probably using an outdated sprockets version, don't know, it works now...

@carhartl carhartl closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.