Take the 2-minute tour ×

I am creating a gem (created with rails plugin new --full) and I want to test my JavaScript with Jasmine.

I have the spec/javascripts stuff set up, but it continues to fail to pull in the the files in app/assets (not spec/dummy/app/assets).

I've tried both the approaches in these posts (basically attempting to force compile the assets):

In both cases, I get this error:

rake aborted!
Don't know how to build task 'tmp:cache:clear'

In the case of the pivotal labs solution, I also get:

undefined method `static_root=' for #<Sprockets::Environment:0x007febe4348ac8>

My code is here: https://github.com/rmw/pixelator/tree/master/spec/javascripts

How can I get the asset pipeline to compile?


share|improve this question
I use evergreen to get around all that mess. Also you should use bundler to create new gems. –  databyte Jul 20 '12 at 19:07
Are you OK with using Guard to dynamically compile your assets? Might be a way to skirt the issue. –  Gabe Hollombe Jul 24 '12 at 8:57
Also, can you link to a public repository with example code? –  Gabe Hollombe Jul 24 '12 at 8:58

1 Answer 1

Have you tried the



share|improve this answer

Your Answer


