2
votes

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?

Thanks!

1
I use evergreen to get around all that mess. Also you should use bundler to create new gems.databyte
Are you OK with using Guard to dynamically compile your assets? Might be a way to skirt the issue.Gabe Hollombe
Also, can you link to a public repository with example code?Gabe Hollombe

1 Answers

0
votes

Have you tried the

guard-jasmine

gem?