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):
- Pivotal Labs: Writing and running Jasmine specs with Rails 3.1 and Coffeescript
- Testing a Rails 3.1 Engine's Javascript with Jasmine
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?
Thanks!