无法使用'application / javascript'类型找到文件'angularjs / rails / resource':

时间:2016-06-28 16:06:45

标签: ruby-on-rails angularjs ruby asset-pipeline

此行出现错误

DT[!x %like% "ND", y := as.integer(as.yearmon(x) > as.yearmon("2016-01")) ]

它出错

//= require angularjs/rails/resource

的Gemfile

ActionView::Template::Error (couldn't find file 'angularjs/rails/resource' with type 'application/javascript'):

1 个答案:

答案 0 :(得分:0)

您可以尝试使用angularjs-rails gem 这对我来说很好用

gem 'angularjs-rails'

然后在您的.js文件中,您可以要求

//= require angular
//= require angular-resource