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 badges
Add a ment  | 

2 Answers 2

Reset to default 7

In 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