Uglifier::Error: Unexpected token: punc (}) after installing ckeditor

231 views
Skip to first unread message

fugee ohu

unread,
Apr 9, 2018, 11:11:05 AM4/9/18
to Ruby on Rails: Talk
After installing ckeditor I'm having this uglifier issue Uglifier::Error: Unexpected token: punc (})

Walter Lee Davis

unread,
Apr 9, 2018, 2:07:32 PM4/9/18
to rubyonra...@googlegroups.com
How did you install ckeditor? Did you use a gem, or just the JS directly? It sounds as though the JS minifier is choking on the syntax in the library code, so that leads me to think you are using a gem, and putting the JS code in the Asset Pipeline. You may want to look into including this script through a CDN or similar, as a test. If that works, then look at the support page for the gem you used, and see if this is a solved problem.

Walter

> On Apr 9, 2018, at 11:11 AM, fugee ohu <fuge...@gmail.com> wrote:
>
> After installing ckeditor I'm having this uglifier issue Uglifier::Error: Unexpected token: punc (})
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
> To post to this group, send email to rubyonra...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/e9e824a7-b610-491f-a1ee-1b0eb0c926da%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Message has been deleted

fugee ohu

unread,
Apr 9, 2018, 6:38:15 PM4/9/18
to Ruby on Rails: Talk
The gem The Readme says to do the following:
# in config/initializers/ckeditor.rb

Ckeditor.setup do |config|
  # //cdn.ckeditor.com/<version.number>/<distribution>/ckeditor.js
  config.cdn_url = "//cdn.ckeditor.com/4.6.1/basic/ckeditor.js"
end

In view template include ckeditor CDN:

= javascript_include_tag Ckeditor.cdn_url

Precompile ckeditor/config.js:

# in config/initializers/assets.rb
 
Rails.application.config.assets.precompile += %w(ckeditor/config.js) 

^ that's a path to the gem's assets/javascripts

fugee ohu

unread,
Apr 9, 2018, 6:51:14 PM4/9/18
to Ruby on Rails: Talk


On Monday, April 9, 2018 at 2:07:32 PM UTC-4, Walter Lee Davis wrote:
Like to get it working before moving on to CDN 
Reply all
Reply to author
Forward
0 new messages