2013-02-21 34 views
6

Tôi có một bộ thông số hoa nhài làm việc tại một thời điểm nào đó cho những người không còn ở công ty của tôi nữa. Tôi đang cố gắng chạyhoa nhài không tải đường ống tài sản

rake jasmine 

tuy nhiên, khi thông số kỹ thuật chạy thì tất cả đều thất bại. Tôi chắc chắn rằng các đường ống dẫn tài sản không tải vì tôi nhận được lỗi như:

ReferenceError: jQuery is not defined 

đây là jasmine.yml tôi

src_files: 
    - 'app/assets/javascripts/application.js' 

stylesheets: 
    - 'app/assets/stylesheets/application.css' 
    # - assets/application.css 
    # - stylesheets/**/*.css 

helpers: 
    - 'helpers/**/*.js' 

spec_files: 
    - '**/*[sS]pec.js' 

# src_dir 
# 
# Source directory path. Your src_files must be returned relative to this path. Will use root if left blank. 
# Default: project root 
# 
# EXAMPLE: 
# 
# src_dir: public 
# 
# src_dir: app/assets 

spec_dir: spec/javascripts 

Đây là application.js tôi

// This is a manifest file that'll be compiled into including all the files listed below. 
// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically 
// be included in the compiled file accessible from http://example.com/assets/application.js 
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the 
// the compiled file. 
// 
//= require jquery 
//= require jquery-ui 
//= require jquery_ujs 
//= require jquery.tipTip 
//= require jquery.endless-scroll 
//= require jquery.groupedautocomplete 
//= require jquery.waituntilexists 
//= require jquery-ui-timepicker-addon 
//= require vendor/jquery.tagsinput 
//= require jquery.contextMenu 
//= require moment 
//= require application_init 
//= require lib/behavior 
//= require tooltip 

//= require underscore 
//= require backbone 
//= require tent 
//= require lib/backbone.store 
//= require backbone_rails_sync 
//= require backbone_datalink 
//= require inflection 
//= require haml 
//= require jquery.toObject 
//= require js2form 
//= require form2js 
//= require_tree ./backbone/models 
//= require_tree ../templates 
//= require ./lib/presenters/presenter 
//= require table-fixed-header 
//= require_tree . 

Liệu bất kỳ ai có bất kỳ đề xuất nào

+0

Bạn có thể thử '// = reqiure jquery' trong 'application.js' của bạn. –

+0

xin lỗi Tôi đã quên đăng application.js của mình, nhưng tôi có nó ở đây – richsoni

+0

Bạn có chắc chắn rằng có thư viện js có tên 'haml'? Trong trường hợp bạn thêm sai tệp, nó có thể dẫn đến' application.js không đúng định dạng '.Bạn cũng có thể đăng Gemfile của mình không? –

Trả lời

2

Đây là ảnh chụp trong bóng tối nhưng tôi gặp vấn đề tương tự với đường ray 3.2 ứng dụng bằng Ruby 2.0. Rõ ràng có một vấn đề với Bánh răng không phân tích cú pháp js/css yêu cầu báo cáo:

https://github.com/sstephenson/sprockets/issues/352

+0

Tôi đã sử dụng gạo hoa nhài. Tôi không chắc chuyện gì đang xảy ra, nhưng tôi có thể làm cho phần mềm trung gian hoạt động, vì vậy tôi đã đi với – richsoni

Các vấn đề liên quan