所以我使用rails 6.0.1并尝试使用Action text。因此,我运行命令rails action_text:install并添加gem迁移,最后运行rails db: image_processing
当我启动我的应用程序时,我收到了这样的错误消息:
Sprockets::FileNotFound in Hotels#index
Showing /myapp/app/views/layouts/application.html.erb where line #8 raised:
couldn't find file 'trix/dist/trix' with type 'text/css'
Checked in these paths:
/myapp/app/assets/config
/myapp/app/assets/images
/myapp/app/assets/javascripts
/myapp/app/assets/stylesheets
/usr/local/bundle/gems/cloudinary-1.13.1/vendor/assets/html
/usr/local/bundle/gems/cloudinary-1.13.1/vendor/assets/javascripts
/usr/local/bundle/gems/activeadmin-2.5.0/app/assets/javascripts
/usr/local/bundle/gems/activeadmin-2.5.0/app/assets/stylesheets
/usr/local/bundle/gems/activeadmin-2.5.0/vendor/assets/javascripts
/usr/local/bundle/gems/jquery-rails-4.3.5/vendor/assets/javascripts
/usr/local/bundle/gems/formtastic-3.1.5/app/assets/stylesheets
/usr/local/bundle/gems/actioncable-6.0.1/app/assets/javascripts
/usr/local/bundle/gems/activestorage-6.0.1/app/assets/javascripts
/usr/local/bundle/gems/actionview-6.0.1/lib/assets/compiled
/usr/local/bundle/gems/turbolinks-source-5.2.0/lib/assets/javascripts
/myapp/node_modules在assets/config/stylesheets/actiontext.scss下有://= require trix/dist/trix和config/initiliazers/assets.rb:Rails.application.config.assets.paths << Rails.root.join('node_modules')
你知道我该怎么解决这个问题吗?
发布于 2019-12-14 17:48:22
我真的找到了解决方案。我必须运行yarn install --check-files,然后重新安装action_text:rails action_text:install,然后它就解决了这个问题。
https://stackoverflow.com/questions/59333840
复制相似问题