Sprockets :: FileNotFound;找不到文件“ selectize.source.css”

时间:2019-11-25 11:31:40

标签: css ruby-on-rails sass sprockets selectize.js

我最近将我的应用程序从Rails 4.2.6升级到Rails 5.2.3

我按照Rails Guides

上的步骤进行操作

现在,当我尝试启动我的开发服务器时,它启动时没有任何错误。 但是,当我在浏览器中单击URL时,出现错误,提示:

Sprockets :: FileNotFound in UserSessions#new

Showing /home/pranjal/source/my-app/app/views/layouts/application.html.erb where line #5 raised:

couldn't find file 'selectize.source.css'
Checked in these paths: 
  /home/pranjal/source/my-app/app/assets/config
  /home/pranjal/source/my-app/app/assets/font-awesome
  /home/pranjal/source/my-app/app/assets/fonts
  /home/pranjal/source/my-app/app/assets/images
  /home/pranjal/source/my-app/app/assets/javascripts
  /home/pranjal/source/my-app/app/assets/stylesheets
  /home/pranjal/source/my-app/vendor/assets/javascripts
  /home/pranjal/source/my-app/vendor/assets/stylesheets
  ...
Extracted source (around line #5):

<!DOCTYPE html>
<html>            
  <head>
    <title>My App</title>
    <%= stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track' => true %>
    <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
    <%= csrf_meta_tags %>
  </head>

1 个答案:

答案 0 :(得分:2)

看起来像js与新版本rails之间的不兼容问题,尝试使用/升级selectize-rails gem并从存储库中删除jscss文件(如果存在)。