我尝试使用d3.js gem(https://github.com/iblue/d3-rails),但我有这个rails错误(rails 5.1.6):
couldn't find file 'd3' with type 'application/javascript'
Checked in these paths:
/Users/.../app/assets/config
/Users/.../app/assets/images
/Users/.../app/assets/javascripts
/Users/.../app/assets/stylesheets
/Users/.../.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/actioncable-5.1.6/lib/assets/compiled
/Users/.../.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/actionview-5.1.6/lib/assets/compiled
/Users/.../code/agiret/project/caloo/node_modules
/Users/.../.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/bootstrap-sass-3.3.7/assets/stylesheets
/Users/.../.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/bootstrap-sass-3.3.7/assets/javascripts
/Users/.../.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/bootstrap-sass-3.3.7/assets/fonts
/Users/.../.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/bootstrap-sass-3.3.7/assets/images
/Users/.../.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/font-awesome-sass-4.7.0/assets/stylesheets
/Users/.../.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/font-awesome-sass-4.7.0/assets/fonts
有人可以帮助我吗?
在这里,我的/app/assets/javascripts/application.js:
//= require jquery
//= require rails-ujs
//= require d3
//= require_tree .
感谢。
答案 0 :(得分:0)
重新启动服务器应该可以解决问题。