Heroku ckeditor 上的 Rails 3.1
我对 ckeditor“3.7.0.rc2”gem 有一个大问题。
在开发过程中,它与 s3 上传后端配合得很好。
但在heroku上它不起作用。
问题是 ckeditor/vendor/skins/(kama) 或 (office2003) 或 (v2) /editor.css 文件包含一个错误,使 sass 编译器尖叫。像这样的错误“filter:;”,因为没有值所以不起作用。
在本地更改文件是没有意义的,因为 heroku 在我部署时下载 gem。
我尝试在本地打包 gem,并制作自己的 git fork 并安装在那里。但是,该
RAILS_ENV=production bundle exec rake assets:precompile
命令会预编译 ckeditor 文件夹中的所有文件,并且始终以“
rake aborted! Permission denied
当我使用安装的“3.7.0.rc2”gem 进行预编译时,预编译了一些 ckeditor js 文件,但不是全部”结束。
我该如何解决这个问题?
I have a big problem with the ckeditor "3.7.0.rc2" gem.
In development it works great with s3 a backend for uploading.
But on heroku it does not work.
The problem is that the ckeditor/vendor/skins/(kama) or (office2003) or (v2) /editor.css files contains an error that makes the sass compiler scream. The error like this "filter:;", since there is no value it does not work.
There is no point in change the files locally, because heroku downloads the gem as I deploy.
I have tried to package the gem locally and make my own git fork and install it for there. But, then the
RAILS_ENV=production bundle exec rake assets:precompile
command precompiles all files in the ckeditor folders and always ends in
rake aborted! Permission denied
When I precompile with the "3.7.0.rc2" gem installed, some ckeditor js files are precompiled but not all.
How can I get around this problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
当您派生 ckeditor gem 并在 Gemfile 中使用派生的 git 路径时,heroku 将从派生的 git 存储库而不是 gem 中提取 ckeditor 的源代码。这应该可以解决问题。
您可以尝试的另一件事是在开发计算机中预编译资产并将资产推送到heroku。这将确保 heroku 不会预编译这些资产。更多信息请访问 http://devcenter.heroku.com/articles/rails31_heroku_cedar。这只会在 cedar stack 上运行
When you fork ckeditor gem and use the forked git path in Gemfile heroku will pull the sources of ckeditor from your forked git repo instead of the gem. This should fix the issue.
Other thing that you could try is precompile the assets in your development machine and push the assets to heroku. This will make sure that heroku will not precompile those assets. More info is available at http://devcenter.heroku.com/articles/rails31_heroku_cedar. This will run only on cedar stack
解决方案是分叉 git 存储库,删除所有不需要的内容并更正错误。 js 文件。然后预编译工作了,现在应用程序正在 heroku 上运行。
这是我的叉子的链接 https://github.com/andreaslyngstad/ckeditor
它在我的项目中有效,但我已经删除了我没有使用的js文件,所以如果你正在使用其中的一些文件,这不适合你。
The solution was to fork the git repo, delete all unnecesarry and correct the errors. js files. Then the precompiling worked and now the app is running on heroku.
Here's a link to my fork https://github.com/andreaslyngstad/ckeditor
It worked in my project, but I have deleted js files that I did not use, so if you are using some of them, this is not for you.