Deploy Rails4 with ckeditor to Heroku , failed with time-out assets:precompile

Viewed 2612

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
Running: rake assets:precompile
even more , finally I get this error: ! 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.

6 Answers

Steps from https://github.com/galetahub/ckeditor worked for me;

Load editor from gem vendor Include ckeditor javascripts in your app/assets/javascripts/application.js:

Include ckeditor javascripts in your app/assets/javascripts/application.js:

//= require ckeditor/init

Make sure that you put it before:

//= require_tree .
Related