Ruby on rails 带有Rails 4 mime类型错误的CKeditor
Keckeditor在开发中对我来说工作得很好。但在我的生产服务器上,它给了我以下错误:Ruby on rails 带有Rails 4 mime类型错误的CKeditor,ruby-on-rails,ckeditor,Ruby On Rails,Ckeditor,Keckeditor在开发中对我来说工作得很好。但在我的生产服务器上,它给了我以下错误: Refused to execute script from '/assets/ckeditor/lang/en.js?t=FB9E' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled. 我不知道是什么问题 所以我检查的是lang文件夹没有预编译。我从开发服务器复制
Refused to execute script from '/assets/ckeditor/lang/en.js?t=FB9E' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
我不知道是什么问题 所以我检查的是lang文件夹没有预编译。我从开发服务器复制了它,并将其粘贴到生产服务器中。现在它工作了。知道为什么它没有预编译吗?我面临着一个类似的问题,即语言文件没有在生产环境中预编译,尽管我已经将其包含在Rails 5的assets.rb中。哦,糟糕,我没有完全阅读您的错误消息。我在对lang文件夹进行预编译时遇到了问题,因此我必须这样做才能使其正常工作->
Rails.application.config.assets.precompile+=%w(ckeditor/*ckeditor/lang/*)
。