tsechingho / ckeditor-rails

Integrate CKEditor javascript library with Rails asset pipeline
https://github.com/tsechingho/ckeditor-rails
MIT License
214 stars 133 forks source link

limiting plugins or languages fo precompile #52

Closed mbaniasad closed 8 years ago

mbaniasad commented 10 years ago

is there a way to limit the number of languages and plugins to reduce precompilation time. this takes a long on heroku and causes heroku compilation time out....

HunterMeyer commented 9 years ago

I'm having the same trouble. In the Ckeditor gem (https://github.com/galetahub/ckeditor) there's a way:

# in config/initializers/ckeditor.rb
Ckeditor.setup do |config|
  config.assets_languages = ['en', 'fr']
  config.assets_plugins = ['image', 'smiley']
end

But I'm getting:

undefined method `setup' for Ckeditor:Module (NoMethodError)

When I try it. If there's no solution, might be better to switch to the other gem.

coorasse commented 9 years ago

+1

JakeTheSnake3p0 commented 9 years ago

+1

griebd commented 9 years ago

@HunterMeyer, just changed from https://github.com/galetahub/ckeditor to this because the config you mentioned doesn't work there... At least here, https://github.com/tsechingho/ckeditor-rails, there is some recent updates...

But my question to anyone: Is there a solution to limit languages and plugins in assets:precompile?

tsechingho commented 9 years ago

yes, there is way to have only limited languages and plugins while compiling assets. it will add some configuration needs.

USvER commented 9 years ago

@tsechingho So is it fixed or not? having problems on heroku deployment too...

HunterMeyer commented 9 years ago

@USvER, I don't know if it's fixed. Doesn't seem like it. I use Heroku and AssetSync, maybe I can help. What problem are you having?

USvER commented 9 years ago

@HunterMeyer i've just disabled the ckeditor plugin and deployment is ok now... I can leave it disabled for now but this have to be fixed. All this language files is taking too much time to compile.

bmishkin commented 9 years ago

+1

griebd commented 9 years ago

@tsechingho you sad that there is a way (or I misunderstood you?), is it documented somewhere? Could you explain how to do it? Some extra configuration is no problem at all...

tsechingho commented 9 years ago

It's not fixed yet. I will do some works for this issue this week and release a new version.

tsechingho commented 9 years ago

Hi, I release v4.4.8 of ckeditor_rails to support assets limitation today.

please see readme for configuration details.

any suggestions are welcome, thanks.

griebd commented 9 years ago

That's great, thanks a lot for your work!!!! Really appreciated!!!!

Edit: for plugins it would be nice to list the ones to remove (black list) instead of listing the ones needed. That is just a suggestion, been able to list the ones to include is already good enough.

tsechingho commented 9 years ago

@griebd there is a tip to have black list.

config.assets_plugins = config.default_plugins - %w[about]