admin管理员组文章数量:1313736
I'm developing a gem and I've installed Jasmine /
All of my required JS files are in my manifest file at app/assets/javascripts/application.js
//= require underscore
//= require backbone
//= require_tree .//vendor
//= require_tree .//custom
//= require_tree .//templates
//= require_tree .//models
//= require_tree .//collections
//= require_tree .//views
And my jasmine.yml file references that:
src_files:
- 'app/assets/javascripts/application.js'
But none of the files specified in it load. Anyone know why? I'm using the latest, Jasmine 1.3.2, which is supposed to support the asset pipeline so that you don't need to use something like jasmine-rails. Any thoughts?
I'm developing a gem and I've installed Jasmine https://github./pivotal/jasmine-gem/
All of my required JS files are in my manifest file at app/assets/javascripts/application.js
//= require underscore
//= require backbone
//= require_tree .//vendor
//= require_tree .//custom
//= require_tree .//templates
//= require_tree .//models
//= require_tree .//collections
//= require_tree .//views
And my jasmine.yml file references that:
src_files:
- 'app/assets/javascripts/application.js'
But none of the files specified in it load. Anyone know why? I'm using the latest, Jasmine 1.3.2, which is supposed to support the asset pipeline so that you don't need to use something like jasmine-rails. Any thoughts?
Share Improve this question edited Sep 10, 2013 at 16:38 New Alexandria 7,3346 gold badges62 silver badges82 bronze badges asked Mar 13, 2013 at 19:40 fourthnenfourthnen 1942 silver badges9 bronze badges2 Answers
Reset to default 7In your jasmine.yml the path should be 'assets/application.js'. If you're still having trouble, make sure you have your jasmine gem under both development and test groups in your Gemfile, as specified in the instructions on https://github./pivotal/jasmine-gem:
group :development, :test do
gem 'jasmine'
end
If you are using Rails 4 there is bug in version 1.3.2 where is it checking config.assets.enabled
which no longer is defined in Rails 4.
The following worked for me.
gem 'jasmine', "~> 2.0.0.rc4"
This is the ticket that talks about the issue. https://github./pivotal/jasmine-gem/pull/177
本文标签: ruby on railsJasmine won39t load javascript files from asset pipelineStack Overflow
版权声明:本文标题:ruby on rails - Jasmine won't load javascript files from asset pipeline - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741958783a2407145.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论