Open snoblenet opened 8 years ago
I'm experiencing this as well. We want to run teaspoon in the test
RAILS_ENV (it seems that teaspoon runs in development by default,) and make use of our already precompiled assets on CI. We want our app assets precompiled but don't necessarily need to precompile the jasmine spec files.
These are all due to changes in the default behavior in sprockets. Have you tried with master? If master doesn't work, I'll need to come up with a workaround, but I have personal life things going on that are keeping me from being able to work on Teaspoon at the moment.
Thanks for the quick reply! I thought that might be the case after finding another issue. We have some other gems that cause a stack overflow (still trying to narrow down which one is causing it) when we upgrade to latest Sprockets. If I can figure that out I'll just upgrade Sprockets.
Best wishes with your personal life.
Thank you. Please provide any details you find when investigating the issue with Teaspoon and in general. The change to sprockets, and the seemingly inability to opt in to allowing assets that are not defined in the precompile list when requesting assets is burdensome on gems like Teaspoon, but that's not your fault. =)
Hi @jejacks0n -- Thanks for your response and best wishes for your current issues.
Since I posted this, I've got the raw Jasmine gem going. This has the advantage of being non-Rails specific, so it makes no particular assumption about the app using the assets pipeline. As it worked, we'll continue with that for the time being.
My Teaspoon :: Javascript Test Runner pages is successfully loading this asset
However, it is also failing to load all these assets.
spec_helper.js
anddemo_spec.js
(actuallyspec_helper.coffee
anddemo_spec.coffee
) are in/spec/javascripts
. The other two files are presumably loaded by the gem:Perhaps the absence of these files is not surprising, given my JavaScript is usually found at
/assets/filename.js
, not/javascripts/filename.js
. However, these files are not being served at these other locations either.What's going on?
Relevant excerpts from my codebase are:
config/initializers/assets.rb:
If you check
Rails.application.config.assets.precompile
in rails console, the input includes:(I've shown the repetition, in case it is significant.)
When I run
bundle exec rake assets:precompile
, the precompiler creates the following:However, it does not create the files like
teaspoon-jasmine2.js
that I can see in the gem's source code atteaspoon/teaspoon-jasmine/lib/teaspoon/jasmine/assets/
.BTW, my
teaspoon_env.rb
&spec_helper.coffee
are both exactly as generated byrails generate teaspoon:install --coffee
:UPDATE
Using
ActionController::Base.helpers.asset_path("teaspoon-jasmine2.js")
, I've established that file is meant to be at"/teaspoon-jasmine2.js"
. However, loading that page instead raises this error:Unknown suite configuration: expected "-jasmine2" to be a configured suite.