galetahub / ckeditor

Ckeditor 4.x integration gem for rails

Home Page:https://ckeditor.com/ckeditor-4/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The asset "ckeditor/application.css" is not present in the asset pipeline.

CaioFML opened this issue · comments

Hello guys, I'm heaving some troubles with assets in Ckeditor::PicturesController#index, the title of this issue was the problem I have, I try to put in application.css this asset, and the problem change to:

ActionView::Template::Error Ckeditor::PicturesController#index
The asset "ckeditor/application.js" is not present in the asset pipeline.

Im using ruby 3.0, rails 6.1.3 and ckeditor 5.1, using this cdn "//cdn.ckeditor.com/4.13.1/full/ckeditor.js" what could cause this? 🤔

@CaioFML This popped up in our application this week as well. We are running ruby 2.7.2, rails 6.1.3.1 (recently upgraded) and ckeditor 4.2.4.

After some digging around, this commit came up:

7b40b09

We were definitely using the old wildcard syntax, which may have been deprecated in sprocket-rails 3.2.0:

rails/sprockets-rails#303

To fix it we had to change our assets initializer to be:

Rails.application.config.assets.precompile += %w[ckeditor/application.css]
Rails.application.config.assets.precompile += %w[ckeditor/application.js]

Which is different than the current installation instructions, but that might be due to the older version of the ckeditor gem.

Hope that helps.

@CaioFML This popped up in our application this week as well. We are running ruby 2.7.2, rails 6.1.3.1 (recently upgraded) and ckeditor 4.2.4.

After some digging around, this commit came up:

7b40b09

We were definitely using the old wildcard syntax, which may have been deprecated in sprocket-rails 3.2.0:

rails/sprockets-rails#303

To fix it we had to change our assets initializer to be:

Rails.application.config.assets.precompile += %w[ckeditor/application.css]
Rails.application.config.assets.precompile += %w[ckeditor/application.js]

Which is different than the current installation instructions, but that might be due to the older version of the ckeditor gem.

Hope that helps.

Thanks, @nathancolgate, it works!

commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.