Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/57.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 带有Rails 4 mime类型错误的CKeditor_Ruby On Rails_Ckeditor - Fatal编程技术网

Ruby on rails 带有Rails 4 mime类型错误的CKeditor

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文件夹没有预编译。我从开发服务器复制

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文件夹没有预编译。我从开发服务器复制了它,并将其粘贴到生产服务器中。现在它工作了。知道为什么它没有预编译吗?我面临着一个类似的问题,即语言文件没有在生产环境中预编译,尽管我已经将其包含在Rails 5的assets.rb中。哦,糟糕,我没有完全阅读您的错误消息。我在对lang文件夹进行预编译时遇到了问题,因此我必须这样做才能使其正常工作->
Rails.application.config.assets.precompile+=%w(ckeditor/*ckeditor/lang/*)