gpt4 book ai didi

Rails 6.0 操作文本找不到类型为 'trix/dist/trix' 的文件 'text/css'

转载 作者:行者123 更新时间:2023-12-04 12:18:20 25 4
gpt4 key购买 nike

所以我使用 rails 6.0.1 并尝试使用 Action 文本。
所以我运行命令 rails action_text:install并添加 gem image_processing
最后运行 rails db:migrate

当我启动我的应用程序时,我收到此错误消息:

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')

知道我如何解决这个问题吗?

最佳答案

我实际上找到了解决方案。
我不得不跑yarn install --check-files然后重新安装 action_text:rails action_text:install然后它解决了这个问题。

关于Rails 6.0 操作文本找不到类型为 'trix/dist/trix' 的文件 'text/css',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59333840/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com