I wrote a rails4 app and deployed to heroku, and everything is ok until I add gem ckeditor
and wanna implement this wysiwyg editor. when I run
git push heroku master
it takes me massive time at this step
Preparing app for Rails asset pipeline
even more , finally I get this error:
Running: rake assets:precompile
! Timed out compiling Ruby/Rails app (15 minutes)
! See https://devcenter.heroku.com/articles/slug-compiler#time-limit
seems this editor is too heavy to compile.
I have searched for the solution , like this two tips-pages
Page I
Page II
After I did like those:
# config/initializers/ckeditor.rb:
Ckeditor.setup do |config|
config.assets = ["ckeditor/ckeditor.js"]
end
still got the same time-out error.
Sigh for wasting so many time waiting that precompile error.
just wondering how to disabe unnecessary packages like some language-packages , plugins exactly.
BTW, things could be done with assets:precompile locally.
So I finally solved it by doing the following:
config.assets.precompile += Ckeditor.assets
to application.rb
gem 'turbo-sprockets-rails3'
to my Gemfile under :assets
group.Bundle Install
Removed the following lines from active_admin.js.coffee
:
//= require active_admin/base
//= require ckeditor/override
//= require ckeditor/init
Pushed to Heroku.
Now everything works because most of the assets have been recompiled before pushing with ckeditor
.
Add config.assets.precompile += Ckeditor.assets
in your application.rb file
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With