rails项目中缺少供应商javascript文件

时间:2015-09-11 06:13:26

标签: javascript jquery ruby-on-rails ruby-on-rails-4

我正在使用rails v4.2.4。我尝试使用命令

创建测试应用程序
rails new app

即使我可以在Gemfile中看到jquery引用(也存在于application.js中),并且我也运行了bundle install,但是,vendor / assets / javascript directoy是空的并且不包含JS文件。我已经运行了bundle install。我应该手动添加它们还是我错过了在Rails项目中为我提取这些文件的命令?

app / assets / javascripts中的

application.js文件

// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// compiled file.
//
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
// about supported directives.
//
//= require jquery
//= require jquery_ujs
//= require turbolinks
//= require_tree .

0 个答案:

没有答案